From 65c00235cc70e73f7d1773b3c78f0f6b5550bfc7 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 2 Aug 2017 15:13:10 +0000 Subject: [PATCH] New upstream version 3.6.2 --- ANNOUNCE | 343 +- CHANGES | 8 +- CMake/3rdparty.cmake | 62 +- CMake/CTest/CTestCustom.cmake | 79 - CMake/CTest/CTestCustomAndroid.cmake.in | 98 + CMake/CTest/CTestCustomWine.cmake.in | 17 + CMake/CTest/dcmtkCTestConfig.cmake.in | 36 - CMake/CTest/dcmtkCTestRun.cmake.in | 18 + CMake/CTest/dcmtkCTestRunAndroid.cmake.in | 23 +- CMake/CTest/dcmtkCTestRunExhaustive.cmake | 6 + CMake/CTest/dcmtkCTestRunWine.cmake.in | 23 + CMake/CheckFunctionWithHeaderExists.cmake | 9 +- CMake/DCMTKConfig.cmake.in | 18 +- ...ig.cmake26.in => DCMTKConfig.old_cmake.in} | 20 +- CMake/GenerateCMakeExports.cmake | 20 +- CMake/GenerateDCMTKConfigure.cmake | 577 ++- CMake/android.toolchain.cmake | 1812 --------- CMake/dcmtkAfterModules.cmake | 6 +- CMake/dcmtkMacros.cmake | 92 +- CMake/dcmtkPrepare.cmake | 187 +- CMake/dcmtkTryCompile.cmake | 8 +- CMake/dcmtkTryRun.cmake | 45 +- CMake/dcmtkUseAndroidSDK.cmake | 155 +- CMake/dcmtkUseWine.cmake | 68 +- CMake/dcmtkWinePath.reg.in | 4 + CMake/osconfig.h.in | 130 +- CMakeLists.txt | 105 +- COPYRIGHT | 473 ++- CREDITS | 5 +- INSTALL | 773 ++-- VERSION | 2 +- config/Makefile.def.in | 3 +- config/Makefile.in | 4 +- config/aclocal.m4 | 44 +- config/configure | 1666 +++++++- config/configure.in | 356 +- config/docs/CMakeLists.txt | 2 +- config/docs/cxx11.dox | 105 +- config/docs/macros.txt | 88 +- config/include/dcmtk/config/osconfig.h.in | 71 +- config/stdcxx.m4 | 980 +++++ config/tests/algo.cc | 58 + config/{ => tests}/arith.cc | 46 +- config/tests/cxx11.cc | 303 ++ config/tests/lfs.c | 30 + config/tests/lfs64.cc | 29 + config/tests/limits.cc | 44 + config/tests/list.cc | 69 + config/tests/map.cc | 59 + config/tests/memory.cc | 55 + config/tests/stack.cc | 44 + config/tests/string.cc | 49 + config/tests/syserr.cc | 58 + config/tests/ttraits.cc | 65 + config/tests/tuple.cc | 47 + config/tests/vector.cc | 96 + dcmdata/CMakeLists.txt | 2 +- dcmdata/apps/Makefile.dep | 144 +- dcmdata/apps/Makefile.in | 30 +- dcmdata/apps/dcm2json.cc | 27 +- dcmdata/apps/dcmconv.cc | 12 +- dcmdata/apps/dcmcrle.cc | 11 +- dcmdata/apps/dcmdrle.cc | 11 +- dcmdata/apps/dcmdump.cc | 49 +- dcmdata/apps/dump2dcm.cc | 12 +- dcmdata/apps/pdf2dcm.cc | 12 +- dcmdata/apps/xml2dcm.cc | 7 +- dcmdata/data/CMakeLists.txt | 9 +- dcmdata/data/dicom.dic | 85 +- dcmdata/docs/CMakeLists.txt | 2 +- dcmdata/docs/dcm2json.man | 58 +- dcmdata/docs/dcm2pdf.man | 26 +- dcmdata/docs/dcm2xml.man | 42 +- dcmdata/docs/dcmconv.man | 30 +- dcmdata/docs/dcmcrle.man | 30 +- dcmdata/docs/dcmdata.dox | 2 +- dcmdata/docs/dcmdrle.man | 28 +- dcmdata/docs/dcmdump.man | 34 +- dcmdata/docs/dcmftest.man | 14 +- dcmdata/docs/dcmgpdir.man | 30 +- dcmdata/docs/dcmodify.man | 44 +- dcmdata/docs/dump2dcm.man | 34 +- dcmdata/docs/img2dcm.man | 46 +- dcmdata/docs/pdf2dcm.man | 22 +- dcmdata/docs/xml2dcm.man | 38 +- dcmdata/include/CMakeLists.txt | 2 +- dcmdata/include/dcmtk/dcmdata/dcbytstr.h | 38 +- dcmdata/include/dcmtk/dcmdata/dcchrstr.h | 10 +- dcmdata/include/dcmtk/dcmdata/dcdatset.h | 45 + dcmdata/include/dcmtk/dcmdata/dcdeftag.h | 67 +- dcmdata/include/dcmtk/dcmdata/dcelem.h | 52 +- dcmdata/include/dcmtk/dcmdata/dcfilefo.h | 42 + dcmdata/include/dcmtk/dcmdata/dchashdi.h | 4 +- dcmdata/include/dcmtk/dcmdata/dcitem.h | 73 +- dcmdata/include/dcmtk/dcmdata/dcjson.h | 22 +- dcmdata/include/dcmtk/dcmdata/dcmatch.h | 2 +- dcmdata/include/dcmtk/dcmdata/dcpixel.h | 20 +- dcmdata/include/dcmtk/dcmdata/dcpixseq.h | 4 +- dcmdata/include/dcmtk/dcmdata/dcsequen.h | 16 +- dcmdata/include/dcmtk/dcmdata/dcspchrs.h | 2 +- dcmdata/include/dcmtk/dcmdata/dcuid.h | 12 + dcmdata/include/dcmtk/dcmdata/dcvr.h | 20 +- dcmdata/include/dcmtk/dcmdata/dcvrae.h | 10 +- dcmdata/include/dcmtk/dcmdata/dcvrat.h | 16 +- dcmdata/include/dcmtk/dcmdata/dcvrcs.h | 10 +- dcmdata/include/dcmtk/dcmdata/dcvrda.h | 13 + dcmdata/include/dcmtk/dcmdata/dcvrdt.h | 8 + dcmdata/include/dcmtk/dcmdata/dcvrfd.h | 4 + dcmdata/include/dcmtk/dcmdata/dcvrfl.h | 20 +- dcmdata/include/dcmtk/dcmdata/dcvrlo.h | 6 +- dcmdata/include/dcmtk/dcmdata/dcvrlt.h | 6 +- dcmdata/include/dcmtk/dcmdata/dcvrobow.h | 19 +- dcmdata/include/dcmtk/dcmdata/dcvrpn.h | 6 +- dcmdata/include/dcmtk/dcmdata/dcvrpobw.h | 23 +- dcmdata/include/dcmtk/dcmdata/dcvrsh.h | 6 +- dcmdata/include/dcmtk/dcmdata/dcvrsl.h | 20 +- dcmdata/include/dcmtk/dcmdata/dcvrss.h | 20 +- dcmdata/include/dcmtk/dcmdata/dcvrst.h | 6 +- dcmdata/include/dcmtk/dcmdata/dcvrtm.h | 11 + dcmdata/include/dcmtk/dcmdata/dcvruc.h | 6 +- dcmdata/include/dcmtk/dcmdata/dcvrui.h | 2 +- dcmdata/include/dcmtk/dcmdata/dcvrul.h | 20 +- dcmdata/include/dcmtk/dcmdata/dcvrur.h | 10 +- dcmdata/include/dcmtk/dcmdata/dcvrus.h | 19 +- dcmdata/include/dcmtk/dcmdata/dcvrut.h | 6 +- dcmdata/include/dcmtk/dcmdata/dcxfer.h | 12 +- dcmdata/libi2d/Makefile.dep | 40 +- dcmdata/libi2d/i2d.cc | 40 +- dcmdata/libi2d/i2djpgs.cc | 6 +- dcmdata/libsrc/CMakeLists.txt | 4 +- dcmdata/libsrc/Makefile.dep | 521 ++- dcmdata/libsrc/cmdlnarg.cc | 16 +- dcmdata/libsrc/dcbytstr.cc | 61 +- dcmdata/libsrc/dcchrstr.cc | 14 +- dcmdata/libsrc/dcdatset.cc | 22 +- dcmdata/libsrc/dcddirif.cc | 19 +- dcmdata/libsrc/dcdicdir.cc | 19 +- dcmdata/libsrc/dcdictbi.cc | 232 +- dcmdata/libsrc/dcdirrec.cc | 9 +- dcmdata/libsrc/dcelem.cc | 126 +- dcmdata/libsrc/dcfilefo.cc | 29 +- dcmdata/libsrc/dcitem.cc | 122 +- dcmdata/libsrc/dcjson.cc | 12 +- dcmdata/libsrc/dcmatch.cc | 8 +- dcmdata/libsrc/dcobject.cc | 23 +- dcmdata/libsrc/dcostrmf.cc | 9 +- dcmdata/libsrc/dcpixel.cc | 134 +- dcmdata/libsrc/dcsequen.cc | 36 +- dcmdata/libsrc/dcuid.cc | 302 +- dcmdata/libsrc/dcvr.cc | 34 +- dcmdata/libsrc/dcvrae.cc | 14 +- dcmdata/libsrc/dcvrat.cc | 28 +- dcmdata/libsrc/dcvrcs.cc | 14 +- dcmdata/libsrc/dcvrda.cc | 35 +- dcmdata/libsrc/dcvrdt.cc | 12 +- dcmdata/libsrc/dcvrfd.cc | 48 +- dcmdata/libsrc/dcvrfl.cc | 48 +- dcmdata/libsrc/dcvrlo.cc | 5 +- dcmdata/libsrc/dcvrlt.cc | 5 +- dcmdata/libsrc/dcvrobow.cc | 31 +- dcmdata/libsrc/dcvrpn.cc | 5 +- dcmdata/libsrc/dcvrpobw.cc | 107 +- dcmdata/libsrc/dcvrsh.cc | 5 +- dcmdata/libsrc/dcvrsl.cc | 48 +- dcmdata/libsrc/dcvrss.cc | 48 +- dcmdata/libsrc/dcvrst.cc | 5 +- dcmdata/libsrc/dcvrtm.cc | 12 +- dcmdata/libsrc/dcvruc.cc | 5 +- dcmdata/libsrc/dcvrul.cc | 48 +- dcmdata/libsrc/dcvrur.cc | 12 + dcmdata/libsrc/dcvrus.cc | 48 +- dcmdata/libsrc/dcvrut.cc | 5 +- dcmdata/libsrc/dcxfer.cc | 197 +- dcmdata/libsrc/mkdeftag.cc | 25 +- dcmdata/libsrc/mkdictbi.cc | 26 +- dcmdata/libsrc/vrscan.cc | 5 +- dcmdata/tests/CMakeLists.txt | 2 +- dcmdata/tests/Makefile.dep | 227 +- dcmdata/tests/Makefile.in | 4 +- dcmdata/tests/tests.cc | 4 +- dcmdata/tests/tgenuid.cc | 56 + dcmdata/tests/tnewdcme.cc | 101 + dcmdata/tests/tparent.cc | 8 +- dcmdata/tests/tpath.cc | 7 +- dcmdata/tests/tpread.cc | 11 +- dcmdata/tests/tvrcomp.cc | 305 +- dcmfg/CMakeLists.txt | 2 +- dcmfg/include/CMakeLists.txt | 2 +- .../dcmtk/dcmfg/fgrealworldvaluemapping.h | 10 +- dcmfg/libsrc/Makefile.dep | 156 +- dcmfg/libsrc/fginterface.cc | 14 +- dcmfg/libsrc/fgrealworldvaluemapping.cc | 10 +- dcmfg/libsrc/stackinterface.cc | 10 +- dcmfg/tests/Makefile.in | 1 - dcmimage/CMakeLists.txt | 2 +- dcmimage/apps/Makefile.dep | 27 +- dcmimage/apps/Makefile.in | 8 +- dcmimage/apps/dcm2pnm.cc | 6 +- dcmimage/apps/dcmquant.cc | 17 +- dcmimage/apps/dcmscale.cc | 6 +- dcmimage/docs/dcm2pnm.man | 32 +- dcmimage/docs/dcmquant.man | 36 +- dcmimage/docs/dcmscale.man | 26 +- dcmimage/include/CMakeLists.txt | 2 +- dcmimage/libsrc/Makefile.dep | 129 +- dcmimage/libsrc/diqthash.cc | 4 +- dcmimgle/CMakeLists.txt | 2 +- dcmimgle/apps/Makefile.dep | 10 +- dcmimgle/apps/Makefile.in | 8 +- dcmimgle/apps/dcmdspfn.cc | 6 +- dcmimgle/data/CMakeLists.txt | 2 +- dcmimgle/docs/dcmdspfn.man | 28 +- dcmimgle/docs/dcod2lum.man | 14 +- dcmimgle/docs/dconvlum.man | 14 +- dcmimgle/include/CMakeLists.txt | 2 +- dcmimgle/libsrc/Makefile.dep | 182 +- dcmiod/CMakeLists.txt | 2 +- dcmiod/include/CMakeLists.txt | 2 +- dcmiod/include/dcmtk/dcmiod/iodcommn.h | 28 +- dcmiod/include/dcmtk/dcmiod/iodimage.h | 18 +- dcmiod/include/dcmtk/dcmiod/iodutil.h | 25 +- .../dcmtk/dcmiod/modcommoninstanceref.h | 16 +- .../dcmtk/dcmiod/modimagepixelvariant.h | 4 +- dcmiod/libsrc/Makefile.dep | 129 +- dcmiod/libsrc/cielabutil.cc | 5 + dcmiod/libsrc/iodcommn.cc | 48 +- dcmiod/libsrc/iodreferences.cc | 8 +- dcmiod/libsrc/iodutil.cc | 77 +- dcmiod/libsrc/modbase.cc | 4 +- dcmiod/libsrc/modhelp.cc | 4 +- dcmiod/libsrc/modimagepixel.cc | 4 +- dcmiod/libsrc/modmultiframedimension.cc | 2 +- dcmiod/libsrc/modusfor.cc | 4 +- dcmiod/tests/Makefile.dep | 18 +- dcmiod/tests/Makefile.in | 8 +- dcmjpeg/apps/CMakeLists.txt | 2 +- dcmjpeg/apps/Makefile.dep | 36 +- dcmjpeg/apps/Makefile.in | 10 +- dcmjpeg/apps/dcmcjpeg.cc | 11 +- dcmjpeg/apps/dcmdjpeg.cc | 11 +- dcmjpeg/docs/dcmcjpeg.man | 32 +- dcmjpeg/docs/dcmdjpeg.man | 28 +- dcmjpeg/docs/dcmj2pnm.man | 32 +- dcmjpeg/docs/dcmmkdir.man | 30 +- dcmjpeg/include/CMakeLists.txt | 2 +- dcmjpeg/include/dcmtk/dcmjpeg/djcodecd.h | 8 +- dcmjpeg/include/dcmtk/dcmjpeg/djdecbas.h | 8 +- dcmjpeg/include/dcmtk/dcmjpeg/djdecext.h | 8 +- dcmjpeg/include/dcmtk/dcmjpeg/djdeclol.h | 8 +- dcmjpeg/include/dcmtk/dcmjpeg/djdecpro.h | 8 +- dcmjpeg/include/dcmtk/dcmjpeg/djdecsps.h | 8 +- dcmjpeg/include/dcmtk/dcmjpeg/djdecsv1.h | 8 +- dcmjpeg/include/dcmtk/dcmjpeg/djutils.h | 12 +- dcmjpeg/libijg12/jerror.c | 1 + dcmjpeg/libijg16/jerror.c | 1 + dcmjpeg/libijg8/jerror.c | 1 + dcmjpeg/libsrc/CMakeLists.txt | 2 +- dcmjpeg/libsrc/Makefile.dep | 192 +- dcmjpeg/libsrc/djcodecd.cc | 7 +- dcmjpeg/libsrc/djcodece.cc | 17 +- dcmjpeg/libsrc/djdecbas.cc | 6 +- dcmjpeg/libsrc/djdecext.cc | 6 +- dcmjpeg/libsrc/djdeclol.cc | 6 +- dcmjpeg/libsrc/djdecpro.cc | 6 +- dcmjpeg/libsrc/djdecsps.cc | 8 +- dcmjpeg/libsrc/djdecsv1.cc | 6 +- dcmjpeg/libsrc/djeijg12.cc | 41 +- dcmjpeg/libsrc/djeijg16.cc | 25 +- dcmjpeg/libsrc/djeijg8.cc | 41 +- dcmjpeg/libsrc/djutils.cc | 28 +- dcmjpls/apps/CMakeLists.txt | 2 +- dcmjpls/apps/Makefile.dep | 27 +- dcmjpls/apps/Makefile.in | 9 +- dcmjpls/apps/dcmcjpls.cc | 11 +- dcmjpls/apps/dcmdjpls.cc | 12 +- dcmjpls/docs/dcmcjpls.man | 32 +- dcmjpls/docs/dcmdjpls.man | 28 +- dcmjpls/docs/dcml2pnm.man | 32 +- dcmjpls/include/CMakeLists.txt | 2 +- dcmjpls/include/dcmtk/dcmjpls/djcodecd.h | 8 +- dcmjpls/include/dcmtk/dcmjpls/djcodece.h | 14 +- dcmjpls/libcharls/CMakeLists.txt | 4 +- dcmjpls/libcharls/Makefile.dep | 22 +- dcmjpls/libcharls/decodstr.h | 4 +- dcmjpls/libcharls/encodstr.h | 10 +- dcmjpls/libcharls/header.cc | 4 +- dcmjpls/libcharls/header.h | 5 +- dcmjpls/libcharls/jpegls.cc | 4 +- dcmjpls/libcharls/scan.h | 6 +- dcmjpls/libsrc/CMakeLists.txt | 2 +- dcmjpls/libsrc/Makefile.dep | 49 +- dcmjpls/libsrc/djcodecd.cc | 17 +- dcmjpls/libsrc/djcodece.cc | 37 +- dcmnet/CMakeLists.txt | 2 +- dcmnet/apps/CMakeLists.txt | 4 +- dcmnet/apps/Makefile.dep | 107 +- dcmnet/apps/Makefile.in | 20 +- dcmnet/apps/echoscu.cc | 23 +- dcmnet/apps/findscu.cc | 19 +- dcmnet/apps/getscu.cc | 14 +- dcmnet/apps/movescu.cc | 77 +- dcmnet/apps/storescp.cc | 90 +- dcmnet/apps/storescu.cc | 38 +- dcmnet/apps/termscu.cc | 23 +- dcmnet/docs/CMakeLists.txt | 2 +- dcmnet/docs/getscu.man | 12 +- dcmnet/docs/movescu.man | 22 +- dcmnet/docs/storescp.man | 35 +- dcmnet/docs/storescu.man | 8 + dcmnet/etc/CMakeLists.txt | 2 +- dcmnet/etc/storescp.cfg | 18 +- dcmnet/etc/storescu.cfg | 9 +- dcmnet/include/CMakeLists.txt | 2 +- dcmnet/include/dcmtk/dcmnet/assoc.h | 12 +- dcmnet/include/dcmtk/dcmnet/cond.h | 2 + dcmnet/include/dcmtk/dcmnet/dcasccfg.h | 33 +- dcmnet/include/dcmtk/dcmnet/dccfrsmp.h | 11 +- dcmnet/include/dcmtk/dcmnet/dcmlayer.h | 6 +- dcmnet/include/dcmtk/dcmnet/dcmtrans.h | 13 +- dcmnet/include/dcmtk/dcmnet/dcompat.h | 28 +- dcmnet/include/dcmtk/dcmnet/dntypes.h | 40 + dcmnet/include/dcmtk/dcmnet/dul.h | 68 +- dcmnet/include/dcmtk/dcmnet/scp.h | 28 +- dcmnet/include/dcmtk/dcmnet/scpcfg.h | 13 + dcmnet/include/dcmtk/dcmnet/scu.h | 8 +- dcmnet/libsrc/Makefile.dep | 399 +- dcmnet/libsrc/assoc.cc | 116 +- dcmnet/libsrc/cond.cc | 1 + dcmnet/libsrc/dcasccfg.cc | 18 +- dcmnet/libsrc/dccfrsmp.cc | 17 +- dcmnet/libsrc/dcmlayer.cc | 4 +- dcmnet/libsrc/dcmtrans.cc | 137 +- dcmnet/libsrc/dcompat.cc | 76 +- dcmnet/libsrc/dfindscu.cc | 8 +- dcmnet/libsrc/dimse.cc | 11 +- dcmnet/libsrc/dimstore.cc | 6 +- dcmnet/libsrc/diutil.cc | 8 +- dcmnet/libsrc/dstorscp.cc | 5 +- dcmnet/libsrc/dstorscu.cc | 2 - dcmnet/libsrc/dul.cc | 226 +- dcmnet/libsrc/dulconst.cc | 3 + dcmnet/libsrc/dulextra.cc | 26 +- dcmnet/libsrc/dulfsm.cc | 192 +- dcmnet/libsrc/dulparse.cc | 10 +- dcmnet/libsrc/dulstruc.h | 8 +- dcmnet/libsrc/dwrap.c | 6 +- dcmnet/libsrc/scp.cc | 30 +- dcmnet/libsrc/scpcfg.cc | 21 +- dcmnet/libsrc/scu.cc | 34 +- dcmnet/tests/Makefile.dep | 57 +- dcmnet/tests/Makefile.in | 2 +- dcmnet/tests/tests.cc | 1 + dcmnet/tests/tscuscp.cc | 148 +- dcmpmap/CMakeLists.txt | 2 +- dcmpmap/include/CMakeLists.txt | 2 +- dcmpmap/libsrc/Makefile.dep | 40 +- dcmpmap/libsrc/dpmparametricmapiod.cc | 16 +- dcmpmap/tests/Makefile.dep | 548 --- dcmpstat/CMakeLists.txt | 4 +- dcmpstat/apps/CMakeLists.txt | 6 +- dcmpstat/apps/Makefile.dep | 94 +- dcmpstat/apps/Makefile.in | 29 +- dcmpstat/apps/dcmmkcrv.cc | 28 +- dcmpstat/apps/dcmmklut.cc | 6 +- dcmpstat/apps/dcmp2pgm.cc | 6 +- dcmpstat/apps/dcmprscp.cc | 27 +- dcmpstat/apps/dcmprscu.cc | 24 +- dcmpstat/apps/dcmpschk.cc | 28 +- dcmpstat/apps/dcmpsmk.cc | 9 - dcmpstat/apps/dcmpsprt.cc | 6 +- dcmpstat/apps/dcmpsrcv.cc | 34 +- dcmpstat/apps/dcmpssnd.cc | 27 +- dcmpstat/data/CMakeLists.txt | 2 +- dcmpstat/docs/dcmmkcrv.man | 24 +- dcmpstat/docs/dcmmklut.man | 26 +- dcmpstat/docs/dcmp2pgm.man | 30 +- dcmpstat/docs/dcmprscp.man | 22 +- dcmpstat/docs/dcmprscu.man | 32 +- dcmpstat/docs/dcmpschk.man | 18 +- dcmpstat/docs/dcmpsmk.man | 26 +- dcmpstat/docs/dcmpsprt.man | 42 +- dcmpstat/docs/dcmpsrcv.man | 22 +- dcmpstat/docs/dcmpssnd.man | 22 +- dcmpstat/etc/CMakeLists.txt | 2 +- dcmpstat/include/CMakeLists.txt | 2 +- dcmpstat/include/dcmtk/dcmpstat/dvcache.h | 14 +- dcmpstat/libsrc/Makefile.dep | 342 +- dcmpstat/libsrc/dcmpstat.cc | 6 +- dcmpstat/libsrc/dviface.cc | 48 +- dcmpstat/libsrc/dvpscu.cc | 100 +- dcmpstat/libsrc/dvpsgll.cc | 10 +- dcmpstat/libsrc/dvpsgr.cc | 62 +- dcmpstat/libsrc/dvpsmsg.cc | 44 +- dcmpstat/libsrc/dvpspr.cc | 7 +- dcmpstat/libsrc/dvpssp.cc | 10 +- dcmpstat/libsrc/dvpstat.cc | 2 +- dcmpstat/libsrc/dvpsvw.cc | 8 +- dcmpstat/tests/CMakeLists.txt | 5 + dcmpstat/tests/Makefile.dep | 8 +- dcmpstat/tests/Makefile.in | 4 +- dcmpstat/tests/msgserv.cc | 63 +- dcmqrdb/CMakeLists.txt | 2 +- dcmqrdb/apps/Makefile.dep | 34 +- dcmqrdb/apps/Makefile.in | 8 +- dcmqrdb/apps/dcmqridx.cc | 8 +- dcmqrdb/apps/dcmqrscp.cc | 150 +- dcmqrdb/apps/dcmqrti.cc | 19 +- dcmqrdb/docs/CMakeLists.txt | 2 +- dcmqrdb/docs/dcmqridx.man | 20 +- dcmqrdb/docs/dcmqrscp.man | 120 +- dcmqrdb/docs/dcmqrti.man | 54 +- dcmqrdb/etc/CMakeLists.txt | 2 +- dcmqrdb/etc/dcmqrprf.cfg | 1071 ++++++ dcmqrdb/include/CMakeLists.txt | 2 +- dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbm.h | 8 +- dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h | 2 +- dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h | 74 +- dcmqrdb/include/dcmtk/dcmqrdb/dcmqropt.h | 10 +- dcmqrdb/include/dcmtk/dcmqrdb/dcmqrsrv.h | 9 +- dcmqrdb/libsrc/Makefile.dep | 104 +- dcmqrdb/libsrc/dcmqrcbg.cc | 7 +- dcmqrdb/libsrc/dcmqrcbm.cc | 26 +- dcmqrdb/libsrc/dcmqrcbs.cc | 5 +- dcmqrdb/libsrc/dcmqrdbi.cc | 82 +- dcmqrdb/libsrc/dcmqropt.cc | 5 +- dcmqrdb/libsrc/dcmqrsrv.cc | 137 +- dcmqrdb/libsrc/dcmqrtis.cc | 5 +- dcmrt/CMakeLists.txt | 2 +- dcmrt/apps/Makefile.dep | 8 +- dcmrt/apps/Makefile.in | 4 +- dcmrt/docs/drtdump.man | 28 +- dcmrt/include/CMakeLists.txt | 2 +- dcmrt/include/dcmtk/dcmrt/drtdose.h | 21 +- dcmrt/include/dcmtk/dcmrt/drtimage.h | 21 +- dcmrt/include/dcmtk/dcmrt/drtionpl.h | 21 +- dcmrt/include/dcmtk/dcmrt/drtiontr.h | 21 +- dcmrt/include/dcmtk/dcmrt/drtplan.h | 21 +- dcmrt/include/dcmtk/dcmrt/drtstrct.h | 21 +- dcmrt/include/dcmtk/dcmrt/drttreat.h | 21 +- dcmrt/include/dcmtk/dcmrt/seq/drtaadcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtadcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtads.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtafs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtags.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtajcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtas1.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtas5.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtas6.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtas7.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtass.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbads.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbas.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbcps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbl2.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbl5.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbldls.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbldps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtblds1.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtblds5.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtblds6.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbldts.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbrcss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbrdrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtbvcps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcbars.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtccs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcctus.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcdrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtces.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcgis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtchs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcims.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcncs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcos.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcpas.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcpis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcsas.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcshs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcsis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtcss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtdcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtdddps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtddps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtdias.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtdimcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtdimrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtdirs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtdrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtdspcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtdss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtdvhs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtdvrrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drteas.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtecs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtes.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtfds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtfes.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtfgs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtfgss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtfms.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtfsss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtgas.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtgmcs.h | 545 +++ dcmrt/include/dcmtk/dcmrt/seq/drtgms.h | 337 ++ dcmrt/include/dcmtk/dcmrt/seq/drtgpis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drthsdrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtiais.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtians.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtiblds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtibls.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtibs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drticpds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drticps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtics.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtiis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtipiqs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtircs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtiseis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtitts.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtiwps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtiws.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtlsds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtlsds6.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtlsds7.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtmacds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtmas.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtmdrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtmls.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtmps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtmris.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtmss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtmucs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtoas.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtois.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtopis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtos.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtpbcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtpcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtpcxs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtpdecs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtpdeds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtpfms.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtpics.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtporcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtporis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtppcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtprsis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtpscs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtpsics.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtpss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtpsss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtpvis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtqds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtras.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrbas2.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrbas8.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrbls.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrbos1.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrbos6.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrbos7.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrbs2.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrbs4.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrbs8.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrcdrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrcos.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrcps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrdros.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrdrs1.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrdrs6.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrdrs8.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrecs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrfgs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrfors.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrics.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrims.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtris.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrlsds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrmdrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrms.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrmss6.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrmss7.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrpcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrpis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrppcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrpphs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrpps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrppss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrris1.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrris6.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrris9.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrrms.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrros.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrrpcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrrros.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrrshs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrrtps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrrtps3.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrrtps4.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrrtps5.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrscs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrsers.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrses.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrshs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrshs6.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrshs7.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrsis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrsns.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrsos.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrsrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrsss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrsts.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrtrs2.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrtrs4.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrvis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrws.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtrwvms.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtscris.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtscs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtsdcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtsds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtshds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtsins.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtsis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtsns.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtspccs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtspcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtspgis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtsptcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtssrcs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtssrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtsss.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drttms0.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drttms9.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drttscds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drttsibs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drttsmds.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drttts.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtudis.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtvls.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtwps.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtwrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtwrsrs.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtws.h | 4 +- dcmrt/include/dcmtk/dcmrt/seq/drtxrs.h | 4 +- dcmrt/libsrc/CMakeLists.txt | 2 +- dcmrt/libsrc/Makefile.dep | 2346 +++++++----- dcmrt/libsrc/Makefile.in | 18 +- dcmrt/libsrc/drtaadcs.cc | 4 +- dcmrt/libsrc/drtadcs.cc | 4 +- dcmrt/libsrc/drtads.cc | 4 +- dcmrt/libsrc/drtafs.cc | 4 +- dcmrt/libsrc/drtags.cc | 4 +- dcmrt/libsrc/drtajcs.cc | 4 +- dcmrt/libsrc/drtas1.cc | 4 +- dcmrt/libsrc/drtas5.cc | 4 +- dcmrt/libsrc/drtas6.cc | 4 +- dcmrt/libsrc/drtas7.cc | 4 +- dcmrt/libsrc/drtass.cc | 4 +- dcmrt/libsrc/drtbads.cc | 4 +- dcmrt/libsrc/drtbas.cc | 4 +- dcmrt/libsrc/drtbcps.cc | 4 +- dcmrt/libsrc/drtbl2.cc | 4 +- dcmrt/libsrc/drtbl5.cc | 4 +- dcmrt/libsrc/drtbldls.cc | 4 +- dcmrt/libsrc/drtbldps.cc | 4 +- dcmrt/libsrc/drtblds1.cc | 4 +- dcmrt/libsrc/drtblds5.cc | 4 +- dcmrt/libsrc/drtblds6.cc | 4 +- dcmrt/libsrc/drtbldts.cc | 4 +- dcmrt/libsrc/drtbrcss.cc | 4 +- dcmrt/libsrc/drtbrdrs.cc | 4 +- dcmrt/libsrc/drtbrs.cc | 4 +- dcmrt/libsrc/drtbs.cc | 4 +- dcmrt/libsrc/drtbss.cc | 4 +- dcmrt/libsrc/drtbvcps.cc | 4 +- dcmrt/libsrc/drtcbars.cc | 4 +- dcmrt/libsrc/drtccs.cc | 4 +- dcmrt/libsrc/drtcctus.cc | 4 +- dcmrt/libsrc/drtcdrs.cc | 4 +- dcmrt/libsrc/drtces.cc | 4 +- dcmrt/libsrc/drtcgis.cc | 4 +- dcmrt/libsrc/drtchs.cc | 4 +- dcmrt/libsrc/drtcims.cc | 4 +- dcmrt/libsrc/drtcis.cc | 4 +- dcmrt/libsrc/drtcncs.cc | 4 +- dcmrt/libsrc/drtcos.cc | 4 +- dcmrt/libsrc/drtcpas.cc | 4 +- dcmrt/libsrc/drtcpis.cc | 4 +- dcmrt/libsrc/drtcps.cc | 4 +- dcmrt/libsrc/drtcs.cc | 4 +- dcmrt/libsrc/drtcsas.cc | 4 +- dcmrt/libsrc/drtcshs.cc | 4 +- dcmrt/libsrc/drtcsis.cc | 4 +- dcmrt/libsrc/drtcss.cc | 4 +- dcmrt/libsrc/drtdcs.cc | 4 +- dcmrt/libsrc/drtdddps.cc | 4 +- dcmrt/libsrc/drtddps.cc | 4 +- dcmrt/libsrc/drtdias.cc | 4 +- dcmrt/libsrc/drtdimcs.cc | 4 +- dcmrt/libsrc/drtdimrs.cc | 4 +- dcmrt/libsrc/drtdirs.cc | 4 +- dcmrt/libsrc/drtdose.cc | 13 +- dcmrt/libsrc/drtdrs.cc | 4 +- dcmrt/libsrc/drtds.cc | 4 +- dcmrt/libsrc/drtdspcs.cc | 4 +- dcmrt/libsrc/drtdss.cc | 4 +- dcmrt/libsrc/drtdvhs.cc | 4 +- dcmrt/libsrc/drtdvrrs.cc | 4 +- dcmrt/libsrc/drteas.cc | 4 +- dcmrt/libsrc/drtecs.cc | 4 +- dcmrt/libsrc/drtes.cc | 4 +- dcmrt/libsrc/drtfds.cc | 4 +- dcmrt/libsrc/drtfes.cc | 4 +- dcmrt/libsrc/drtfgs.cc | 4 +- dcmrt/libsrc/drtfgss.cc | 4 +- dcmrt/libsrc/drtfms.cc | 4 +- dcmrt/libsrc/drtfsss.cc | 4 +- dcmrt/libsrc/drtgas.cc | 4 +- dcmrt/libsrc/drtgmcs.cc | 957 +++++ dcmrt/libsrc/drtgms.cc | 580 +++ dcmrt/libsrc/drtgpis.cc | 4 +- dcmrt/libsrc/drthsdrs.cc | 4 +- dcmrt/libsrc/drtiais.cc | 4 +- dcmrt/libsrc/drtians.cc | 4 +- dcmrt/libsrc/drtiblds.cc | 4 +- dcmrt/libsrc/drtibls.cc | 4 +- dcmrt/libsrc/drtibs.cc | 4 +- dcmrt/libsrc/drticpds.cc | 4 +- dcmrt/libsrc/drticps.cc | 4 +- dcmrt/libsrc/drtics.cc | 4 +- dcmrt/libsrc/drtiis.cc | 4 +- dcmrt/libsrc/drtimage.cc | 13 +- dcmrt/libsrc/drtionpl.cc | 13 +- dcmrt/libsrc/drtiontr.cc | 13 +- dcmrt/libsrc/drtipiqs.cc | 4 +- dcmrt/libsrc/drtircs.cc | 4 +- dcmrt/libsrc/drtiseis.cc | 4 +- dcmrt/libsrc/drtitts.cc | 4 +- dcmrt/libsrc/drtiwps.cc | 4 +- dcmrt/libsrc/drtiws.cc | 4 +- dcmrt/libsrc/drtlsds.cc | 4 +- dcmrt/libsrc/drtlsds6.cc | 4 +- dcmrt/libsrc/drtlsds7.cc | 4 +- dcmrt/libsrc/drtmacds.cc | 4 +- dcmrt/libsrc/drtmas.cc | 4 +- dcmrt/libsrc/drtmdrs.cc | 4 +- dcmrt/libsrc/drtmls.cc | 4 +- dcmrt/libsrc/drtmps.cc | 4 +- dcmrt/libsrc/drtmris.cc | 4 +- dcmrt/libsrc/drtmss.cc | 4 +- dcmrt/libsrc/drtmucs.cc | 4 +- dcmrt/libsrc/drtoas.cc | 4 +- dcmrt/libsrc/drtois.cc | 4 +- dcmrt/libsrc/drtopis.cc | 4 +- dcmrt/libsrc/drtos.cc | 4 +- dcmrt/libsrc/drtpbcs.cc | 4 +- dcmrt/libsrc/drtpcs.cc | 4 +- dcmrt/libsrc/drtpcxs.cc | 4 +- dcmrt/libsrc/drtpdecs.cc | 4 +- dcmrt/libsrc/drtpdeds.cc | 4 +- dcmrt/libsrc/drtpfms.cc | 4 +- dcmrt/libsrc/drtpics.cc | 4 +- dcmrt/libsrc/drtplan.cc | 13 +- dcmrt/libsrc/drtporcs.cc | 4 +- dcmrt/libsrc/drtporis.cc | 4 +- dcmrt/libsrc/drtppcs.cc | 4 +- dcmrt/libsrc/drtprsis.cc | 4 +- dcmrt/libsrc/drtpscs.cc | 4 +- dcmrt/libsrc/drtpsics.cc | 4 +- dcmrt/libsrc/drtpss.cc | 4 +- dcmrt/libsrc/drtpsss.cc | 4 +- dcmrt/libsrc/drtpvis.cc | 4 +- dcmrt/libsrc/drtqds.cc | 4 +- dcmrt/libsrc/drtras.cc | 4 +- dcmrt/libsrc/drtrbas2.cc | 4 +- dcmrt/libsrc/drtrbas8.cc | 4 +- dcmrt/libsrc/drtrbls.cc | 4 +- dcmrt/libsrc/drtrbos1.cc | 4 +- dcmrt/libsrc/drtrbos6.cc | 4 +- dcmrt/libsrc/drtrbos7.cc | 4 +- dcmrt/libsrc/drtrbs2.cc | 4 +- dcmrt/libsrc/drtrbs4.cc | 4 +- dcmrt/libsrc/drtrbs8.cc | 4 +- dcmrt/libsrc/drtrcdrs.cc | 4 +- dcmrt/libsrc/drtrcos.cc | 4 +- dcmrt/libsrc/drtrcps.cc | 4 +- dcmrt/libsrc/drtrcs.cc | 4 +- dcmrt/libsrc/drtrdros.cc | 4 +- dcmrt/libsrc/drtrdrs1.cc | 4 +- dcmrt/libsrc/drtrdrs6.cc | 4 +- dcmrt/libsrc/drtrdrs8.cc | 4 +- dcmrt/libsrc/drtrds.cc | 4 +- dcmrt/libsrc/drtrecs.cc | 4 +- dcmrt/libsrc/drtrfgs.cc | 4 +- dcmrt/libsrc/drtrfors.cc | 4 +- dcmrt/libsrc/drtrics.cc | 4 +- dcmrt/libsrc/drtrims.cc | 4 +- dcmrt/libsrc/drtris.cc | 4 +- dcmrt/libsrc/drtrlsds.cc | 4 +- dcmrt/libsrc/drtrmdrs.cc | 4 +- dcmrt/libsrc/drtrms.cc | 4 +- dcmrt/libsrc/drtrmss6.cc | 4 +- dcmrt/libsrc/drtrmss7.cc | 4 +- dcmrt/libsrc/drtrpcs.cc | 4 +- dcmrt/libsrc/drtrpis.cc | 4 +- dcmrt/libsrc/drtrppcs.cc | 4 +- dcmrt/libsrc/drtrpphs.cc | 4 +- dcmrt/libsrc/drtrpps.cc | 4 +- dcmrt/libsrc/drtrppss.cc | 4 +- dcmrt/libsrc/drtrps.cc | 4 +- dcmrt/libsrc/drtrris1.cc | 4 +- dcmrt/libsrc/drtrris6.cc | 4 +- dcmrt/libsrc/drtrris9.cc | 4 +- dcmrt/libsrc/drtrrms.cc | 4 +- dcmrt/libsrc/drtrros.cc | 4 +- dcmrt/libsrc/drtrrpcs.cc | 4 +- dcmrt/libsrc/drtrrros.cc | 4 +- dcmrt/libsrc/drtrrs.cc | 4 +- dcmrt/libsrc/drtrrshs.cc | 4 +- dcmrt/libsrc/drtrrtps.cc | 4 +- dcmrt/libsrc/drtrrtps3.cc | 4 +- dcmrt/libsrc/drtrrtps4.cc | 4 +- dcmrt/libsrc/drtrrtps5.cc | 4 +- dcmrt/libsrc/drtrscs.cc | 4 +- dcmrt/libsrc/drtrsers.cc | 4 +- dcmrt/libsrc/drtrses.cc | 4 +- dcmrt/libsrc/drtrshs.cc | 4 +- dcmrt/libsrc/drtrshs6.cc | 4 +- dcmrt/libsrc/drtrshs7.cc | 4 +- dcmrt/libsrc/drtrsis.cc | 4 +- dcmrt/libsrc/drtrsns.cc | 4 +- dcmrt/libsrc/drtrsos.cc | 4 +- dcmrt/libsrc/drtrsrs.cc | 4 +- dcmrt/libsrc/drtrss.cc | 4 +- dcmrt/libsrc/drtrsss.cc | 4 +- dcmrt/libsrc/drtrsts.cc | 4 +- dcmrt/libsrc/drtrtrs2.cc | 4 +- dcmrt/libsrc/drtrtrs4.cc | 4 +- dcmrt/libsrc/drtrvis.cc | 4 +- dcmrt/libsrc/drtrws.cc | 4 +- dcmrt/libsrc/drtrwvms.cc | 4 +- dcmrt/libsrc/drtscris.cc | 4 +- dcmrt/libsrc/drtscs.cc | 4 +- dcmrt/libsrc/drtsdcs.cc | 4 +- dcmrt/libsrc/drtsds.cc | 4 +- dcmrt/libsrc/drtshds.cc | 4 +- dcmrt/libsrc/drtsins.cc | 4 +- dcmrt/libsrc/drtsis.cc | 4 +- dcmrt/libsrc/drtsns.cc | 4 +- dcmrt/libsrc/drtspccs.cc | 4 +- dcmrt/libsrc/drtspcs.cc | 4 +- dcmrt/libsrc/drtspgis.cc | 4 +- dcmrt/libsrc/drtsptcs.cc | 4 +- dcmrt/libsrc/drtss.cc | 4 +- dcmrt/libsrc/drtssrcs.cc | 4 +- dcmrt/libsrc/drtssrs.cc | 4 +- dcmrt/libsrc/drtsss.cc | 4 +- dcmrt/libsrc/drtstrct.cc | 13 +- dcmrt/libsrc/drttms0.cc | 4 +- dcmrt/libsrc/drttms9.cc | 4 +- dcmrt/libsrc/drttreat.cc | 13 +- dcmrt/libsrc/drttscds.cc | 4 +- dcmrt/libsrc/drttsibs.cc | 4 +- dcmrt/libsrc/drttsmds.cc | 4 +- dcmrt/libsrc/drttts.cc | 4 +- dcmrt/libsrc/drtudis.cc | 4 +- dcmrt/libsrc/drtvls.cc | 4 +- dcmrt/libsrc/drtwps.cc | 4 +- dcmrt/libsrc/drtwrs.cc | 4 +- dcmrt/libsrc/drtwrsrs.cc | 4 +- dcmrt/libsrc/drtws.cc | 4 +- dcmrt/libsrc/drtxrs.cc | 4 +- dcmrt/tests/Makefile.dep | 23 +- dcmrt/tests/Makefile.in | 4 +- dcmseg/CMakeLists.txt | 2 +- dcmseg/include/CMakeLists.txt | 2 +- dcmseg/include/dcmtk/dcmseg/segdoc.h | 8 +- dcmseg/include/dcmtk/dcmseg/segment.h | 32 +- dcmseg/libsrc/Makefile.dep | 32 +- dcmseg/libsrc/segdoc.cc | 45 +- dcmseg/libsrc/segment.cc | 30 +- dcmseg/tests/Makefile.dep | 15 +- dcmseg/tests/Makefile.in | 9 +- dcmsign/CMakeLists.txt | 2 +- dcmsign/apps/Makefile.dep | 9 +- dcmsign/apps/Makefile.in | 8 +- dcmsign/apps/dcmsign.cc | 12 +- dcmsign/docs/dcmsign.man | 32 +- dcmsign/include/CMakeLists.txt | 2 +- dcmsign/libsrc/Makefile.dep | 54 +- dcmsign/libsrc/sicertvf.cc | 18 +- dcmsr/CMakeLists.txt | 2 +- dcmsr/apps/Makefile.dep | 48 +- dcmsr/apps/Makefile.in | 10 +- dcmsr/data/CMakeLists.txt | 2 +- dcmsr/data/dsr2xml.xsd | 11 +- dcmsr/docs/dsr2html.man | 34 +- dcmsr/docs/dsr2xml.man | 38 +- dcmsr/docs/dsrdump.man | 30 +- dcmsr/docs/xml2dsr.man | 38 +- dcmsr/include/CMakeLists.txt | 2 +- dcmsr/include/dcmtk/dcmsr/codes/dcm.h | 13 +- dcmsr/include/dcmtk/dcmsr/codes/ncit.h | 9 +- dcmsr/include/dcmtk/dcmsr/codes/srt.h | 10 +- dcmsr/include/dcmtk/dcmsr/codes/ucum.h | 6 +- dcmsr/include/dcmtk/dcmsr/codes/umls.h | 6 +- dcmsr/include/dcmtk/dcmsr/dsrdncsr.h | 2 +- dcmsr/include/dcmtk/dcmsr/dsrdoc.h | 10 +- dcmsr/include/dcmtk/dcmsr/dsrdocst.h | 28 +- dcmsr/include/dcmtk/dcmsr/dsrtlist.h | 18 +- dcmsr/include/dcmtk/dcmsr/dsrtncsr.h | 15 + dcmsr/include/dcmtk/dcmsr/dsrtypes.h | 20 +- dcmsr/libcmr/Makefile.dep | 360 +- dcmsr/libcmr/tid1600.cc | 10 +- dcmsr/libsrc/Makefile.dep | 616 +-- dcmsr/libsrc/dsrdoc.cc | 24 +- dcmsr/libsrc/dsrdocst.cc | 33 +- dcmsr/libsrc/dsrimgfr.cc | 21 +- dcmsr/libsrc/dsrimgse.cc | 21 +- dcmsr/libsrc/dsrsc3gr.cc | 22 +- dcmsr/libsrc/dsrscogr.cc | 22 +- dcmsr/libsrc/dsrtcodt.cc | 22 +- dcmsr/libsrc/dsrtcosp.cc | 21 +- dcmsr/libsrc/dsrtcoto.cc | 21 +- dcmsr/libsrc/dsrtypes.cc | 66 +- dcmsr/libsrc/dsrwavch.cc | 22 +- dcmsr/tests/Makefile.dep | 87 +- dcmsr/tests/Makefile.in | 6 +- dcmsr/tests/tests.cc | 4 +- dcmsr/tests/tsrdoctr.cc | 81 +- dcmsr/tests/tsrlist.cc | 52 +- dcmtls/CMakeLists.txt | 2 +- dcmtls/docs/CMakeLists.txt | 2 +- dcmtls/include/CMakeLists.txt | 2 +- dcmtls/include/dcmtk/dcmtls/tlslayer.h | 4 +- dcmtls/include/dcmtk/dcmtls/tlstrans.h | 4 +- dcmtls/libsrc/Makefile.dep | 26 +- dcmtls/libsrc/tlslayer.cc | 3 +- dcmtls/libsrc/tlstrans.cc | 20 +- dcmtract/CMakeLists.txt | 2 +- dcmtract/include/CMakeLists.txt | 2 +- dcmtract/libsrc/Makefile.dep | 51 +- dcmtract/libsrc/trcstatistic.cc | 4 +- dcmtract/libsrc/trctrack.cc | 8 +- dcmtract/libsrc/trctractographyresults.cc | 4 +- dcmwlm/CMakeLists.txt | 4 +- dcmwlm/apps/CMakeLists.txt | 2 +- dcmwlm/apps/Makefile.dep | 16 +- dcmwlm/apps/Makefile.in | 4 +- dcmwlm/apps/wlcefs.cc | 4 +- dcmwlm/data/CMakeLists.txt | 2 +- dcmwlm/docs/wlmscpfs.man | 42 +- dcmwlm/include/CMakeLists.txt | 2 +- dcmwlm/include/dcmtk/dcmwlm/wlds.h | 8 +- dcmwlm/include/dcmtk/dcmwlm/wldsfs.h | 4 +- dcmwlm/include/dcmtk/dcmwlm/wlfsim.h | 288 +- dcmwlm/libsrc/Makefile.dep | 32 +- dcmwlm/libsrc/wlds.cc | 12 +- dcmwlm/libsrc/wldsfs.cc | 7 +- dcmwlm/libsrc/wlfsim.cc | 1476 +------- dcmwlm/libsrc/wlmactmg.cc | 40 +- dcmwlm/tests/CMakeLists.txt | 5 + dcmwlm/tests/Makefile.dep | 8 +- dcmwlm/tests/Makefile.in | 4 +- dcmwlm/tests/wltest.cc | 11 +- docs/{CHANGES.361 => CHANGES.362} | 3344 ++++++++++++++++- doxygen/CMakeLists.txt | 33 +- doxygen/htmldocs.cfg | 2 +- doxygen/manpages.cfg | 2 +- doxygen/manpages/man1/dcm2json.1 | 28 +- doxygen/manpages/man1/dcm2pdf.1 | 2 +- doxygen/manpages/man1/dcm2pnm.1 | 2 +- doxygen/manpages/man1/dcm2xml.1 | 2 +- doxygen/manpages/man1/dcmcjpeg.1 | 4 +- doxygen/manpages/man1/dcmcjpls.1 | 2 +- doxygen/manpages/man1/dcmconv.1 | 6 +- doxygen/manpages/man1/dcmcrle.1 | 2 +- doxygen/manpages/man1/dcmdjpeg.1 | 2 +- doxygen/manpages/man1/dcmdjpls.1 | 2 +- doxygen/manpages/man1/dcmdrle.1 | 2 +- doxygen/manpages/man1/dcmdspfn.1 | 4 +- doxygen/manpages/man1/dcmdump.1 | 8 +- doxygen/manpages/man1/dcmftest.1 | 2 +- doxygen/manpages/man1/dcmgpdir.1 | 2 +- doxygen/manpages/man1/dcmj2pnm.1 | 2 +- doxygen/manpages/man1/dcml2pnm.1 | 2 +- doxygen/manpages/man1/dcmmkcrv.1 | 2 +- doxygen/manpages/man1/dcmmkdir.1 | 2 +- doxygen/manpages/man1/dcmmklut.1 | 2 +- doxygen/manpages/man1/dcmodify.1 | 2 +- doxygen/manpages/man1/dcmp2pgm.1 | 2 +- doxygen/manpages/man1/dcmprscp.1 | 2 +- doxygen/manpages/man1/dcmprscu.1 | 2 +- doxygen/manpages/man1/dcmpschk.1 | 2 +- doxygen/manpages/man1/dcmpsmk.1 | 4 +- doxygen/manpages/man1/dcmpsprt.1 | 2 +- doxygen/manpages/man1/dcmpsrcv.1 | 2 +- doxygen/manpages/man1/dcmpssnd.1 | 2 +- doxygen/manpages/man1/dcmqridx.1 | 2 +- doxygen/manpages/man1/dcmqrscp.1 | 66 +- doxygen/manpages/man1/dcmqrti.1 | 4 +- doxygen/manpages/man1/dcmquant.1 | 15 +- doxygen/manpages/man1/dcmrecv.1 | 2 +- doxygen/manpages/man1/dcmscale.1 | 4 +- doxygen/manpages/man1/dcmsend.1 | 2 +- doxygen/manpages/man1/dcmsign.1 | 2 +- doxygen/manpages/man1/dcod2lum.1 | 2 +- doxygen/manpages/man1/dconvlum.1 | 2 +- doxygen/manpages/man1/drtdump.1 | 2 +- doxygen/manpages/man1/dsr2html.1 | 2 +- doxygen/manpages/man1/dsr2xml.1 | 4 +- doxygen/manpages/man1/dsrdump.1 | 2 +- doxygen/manpages/man1/dump2dcm.1 | 2 +- doxygen/manpages/man1/echoscu.1 | 2 +- doxygen/manpages/man1/findscu.1 | 2 +- doxygen/manpages/man1/getscu.1 | 10 +- doxygen/manpages/man1/img2dcm.1 | 2 +- doxygen/manpages/man1/movescu.1 | 22 +- doxygen/manpages/man1/pdf2dcm.1 | 2 +- doxygen/manpages/man1/storescp.1 | 22 +- doxygen/manpages/man1/storescu.1 | 10 +- doxygen/manpages/man1/termscu.1 | 2 +- doxygen/manpages/man1/wlmscpfs.1 | 12 +- doxygen/manpages/man1/xml2dcm.1 | 2 +- doxygen/manpages/man1/xml2dsr.1 | 2 +- oflog/CMakeLists.txt | 2 +- oflog/etc/CMakeLists.txt | 2 +- oflog/include/CMakeLists.txt | 2 +- oflog/include/dcmtk/oflog/appender.h | 12 +- oflog/include/dcmtk/oflog/hierarchy.h | 4 +- oflog/include/dcmtk/oflog/oflog.h | 6 +- oflog/include/dcmtk/oflog/spi/factory.h | 10 +- oflog/include/dcmtk/oflog/spi/logevent.h | 4 +- oflog/libsrc/Makefile.dep | 270 +- oflog/libsrc/appender.cc | 14 +- oflog/libsrc/hierarchy.cc | 4 +- oflog/libsrc/logevent.cc | 5 +- oflog/libsrc/oflog.cc | 8 +- oflog/libsrc/strcloc.cc | 6 + oflog/libsrc/striconv.cc | 6 + ofstd/CMakeLists.txt | 2 +- ofstd/include/CMakeLists.txt | 2 +- ofstd/include/dcmtk/ofstd/diag/overflow.def | 6 +- ofstd/include/dcmtk/ofstd/ofalgo.h | 4 +- ofstd/include/dcmtk/ofstd/ofalign.h | 48 +- ofstd/include/dcmtk/ofstd/ofaptr.h | 175 - ofstd/include/dcmtk/ofstd/ofchrenc.h | 4 +- ofstd/include/dcmtk/ofstd/ofdefine.h | 4 +- ofstd/include/dcmtk/ofstd/oferror.h | 245 ++ ofstd/include/dcmtk/ofstd/offile.h | 44 +- ofstd/include/dcmtk/ofstd/oflimits.h | 40 +- ofstd/include/dcmtk/ofstd/oflist.h | 2 +- ofstd/include/dcmtk/ofstd/ofmap.h | 4 +- ofstd/include/dcmtk/ofstd/ofmem.h | 4 +- ofstd/include/dcmtk/ofstd/ofoption.h | 18 +- ofstd/include/dcmtk/ofstd/ofstack.h | 4 +- ofstd/include/dcmtk/ofstd/ofstd.h | 45 +- ofstd/include/dcmtk/ofstd/ofstream.h | 4 +- ofstd/include/dcmtk/ofstd/ofstring.h | 8 +- ofstd/include/dcmtk/ofstd/oftraits.h | 4 +- ofstd/include/dcmtk/ofstd/oftuple.h | 23 +- ofstd/include/dcmtk/ofstd/oftypes.h | 6 +- ofstd/include/dcmtk/ofstd/ofutil.h | 205 +- ofstd/include/dcmtk/ofstd/ofvector.h | 6 +- ofstd/include/dcmtk/ofstd/ofvriant.h | 4 +- ofstd/include/dcmtk/ofstd/variadic/tuple.h | 11 + ofstd/libsrc/CMakeLists.txt | 4 +- ofstd/libsrc/Makefile.dep | 47 +- ofstd/libsrc/Makefile.in | 3 +- ofstd/libsrc/ofchrenc.cc | 21 + ofstd/libsrc/oferror.cc | 205 + ofstd/libsrc/ofstd.cc | 98 +- ofstd/libsrc/ofstring.cc | 6 +- ofstd/libsrc/ofthread.cc | 32 +- ofstd/libsrc/oftime.cc | 43 +- ofstd/libsrc/ofxml.cc | 18 + ofstd/tests/CMakeLists.txt | 4 +- ofstd/tests/Makefile.dep | 88 +- ofstd/tests/Makefile.in | 6 +- ofstd/tests/tatof.cc | 4 +- ofstd/tests/terror.cc | 94 + ofstd/tests/tests.cc | 1 + ofstd/tests/tofdatim.cc | 6 +- ofstd/tests/toption.cc | 4 +- ofstd/tests/tvec.cc | 8 + 1098 files changed, 26603 insertions(+), 13187 deletions(-) delete mode 100644 CMake/CTest/CTestCustom.cmake create mode 100644 CMake/CTest/CTestCustomAndroid.cmake.in create mode 100644 CMake/CTest/CTestCustomWine.cmake.in delete mode 100644 CMake/CTest/dcmtkCTestConfig.cmake.in create mode 100644 CMake/CTest/dcmtkCTestRun.cmake.in create mode 100644 CMake/CTest/dcmtkCTestRunExhaustive.cmake create mode 100644 CMake/CTest/dcmtkCTestRunWine.cmake.in rename CMake/{DCMTKConfig.cmake26.in => DCMTKConfig.old_cmake.in} (67%) mode change 100644 => 100755 CMake/GenerateDCMTKConfigure.cmake delete mode 100644 CMake/android.toolchain.cmake create mode 100644 CMake/dcmtkWinePath.reg.in create mode 100644 config/stdcxx.m4 create mode 100644 config/tests/algo.cc rename config/{ => tests}/arith.cc (95%) create mode 100644 config/tests/cxx11.cc create mode 100644 config/tests/lfs.c create mode 100644 config/tests/lfs64.cc create mode 100644 config/tests/limits.cc create mode 100644 config/tests/list.cc create mode 100644 config/tests/map.cc create mode 100644 config/tests/memory.cc create mode 100644 config/tests/stack.cc create mode 100644 config/tests/string.cc create mode 100644 config/tests/syserr.cc create mode 100644 config/tests/ttraits.cc create mode 100644 config/tests/tuple.cc create mode 100644 config/tests/vector.cc create mode 100644 dcmdata/tests/tgenuid.cc create mode 100644 dcmdata/tests/tnewdcme.cc create mode 100644 dcmnet/include/dcmtk/dcmnet/dntypes.h delete mode 100644 dcmpmap/tests/Makefile.dep create mode 100644 dcmpstat/tests/CMakeLists.txt create mode 100644 dcmqrdb/etc/dcmqrprf.cfg create mode 100644 dcmrt/include/dcmtk/dcmrt/seq/drtgmcs.h create mode 100644 dcmrt/include/dcmtk/dcmrt/seq/drtgms.h create mode 100644 dcmrt/libsrc/drtgmcs.cc create mode 100644 dcmrt/libsrc/drtgms.cc create mode 100644 dcmwlm/tests/CMakeLists.txt rename docs/{CHANGES.361 => CHANGES.362} (86%) delete mode 100644 ofstd/include/dcmtk/ofstd/ofaptr.h create mode 100644 ofstd/include/dcmtk/ofstd/oferror.h create mode 100644 ofstd/libsrc/oferror.cc create mode 100644 ofstd/tests/terror.cc diff --git a/ANNOUNCE b/ANNOUNCE index 4a26a22e..08163653 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,29 +1,346 @@ - -------------------------------------------------------------------------------- - Since this is a development snapshot of the DCMTK, there is no public - announcement. This file will be updated for the next official release. -------------------------------------------------------------------------------- - - ANNOUNCEMENT -Version X.Y.Z of the OFFIS DCMTK (DICOM ToolKit) software is now available for +Version 3.6.2 of the OFFIS DCMTK (DICOM ToolKit) software is now available for public release. This release includes the following main changes over the previous version 3.6.0: - [...] +- DCMTK 3.6.2 builds correctly on older and up-to-date versions of GNU gcc + (4.2.1 to 7.1.1) Clang (3.4.1 to 4.0.1), Microsoft Visual Studio (2005 to + 2017) and SunPro CC (5.14 and 5.15). + +- Tested with the following operating systems/environments: + + - Android on arm64 + - Cygwin on x86_64 + - FreeBSD on x86_64 + - Linux on x86_64 and x86 + - MacOS X on x86_64 + - NetBSD on x86_64 + - OpenBSD on x86_64 + - OpenIndiana on x86 + - QNX on x86 + - Solaris on x86 + - Windows (and MinGW) on x86_64 and x86 + + For a complete list of tested systems and compilers, see the INSTALL file. + +- The CMake build system is now considered as mature as our GNU Autoconf + setup. There are even some features that are only available when using CMake, + for example exporting the build configuration in order to easily integrate + DCMTK into other CMake based projects. + +- It is now possible to build shared libraries (Linux) resp. dynamic link + libraries (DLLs, Windows) using CMake and the "BUILD_SHARED_LIBS" option. + DCMTK can even be compiled into a single shared library (e.g. "dcmtk.dll") + using the "BUILD_SINGLE_SHARED_LIBRARY" option. + +- Added character set transcoding support: + + - Support for converting DICOM files, datasets and element values between + different character sets (incl. code extension techniques). + - Windows-specific support for converting between wide character encoding and + e.g. UTF-8 or Latin-1. + - Support for wide character strings (UTF-16) used for filenames by the + Windows operating system. + - Supports replacing the underlying character set conversion implementation as + needed using either: + - GNU libiconv, + - International Components for Unicode (ICU) or + - the iconv functions from the C standard library. + - "dcmqrdb" allows matching queries with datasets using different character + sets and response conversion. + +- Integrated a unit test framework and added several unit tests to ensure that + basic functionality (e.g. parsing DICOM data, network transmission) will + never break. + +- Updated CharLS to version 1.0 and log4cplus to version 1.1.0. + +- Added cross compiling support for Windows and Android targets. The Android + emulator and Wine have been integrated into our CMake setup for running the + run time configuration tests as required and (optionally) the unit tests. + +- Refactored native STL integration: + + - Added arguments resp. variables to Autoconf and CMake replacing the old + macros for choosing whether to use DCMTK's fallback or the native + implementation of various STL features. See the INSTALL file for more + information about this. + - Added configuration tests ensuring that the enabled STL features work as + expected/required before actually using them. + - Added unit tests to ensure whichever chosen implementation actually works. + +- Added support for several C++11 (and newer) features and fallback + implementations as required: + + - Added arguments resp. variables to Autoconf and CMake for enabling native + C++11 support or DCMTK's own fallback implementations and workarounds. See + the INSTALL file for more information. + - Added configuration tests that ensure that the compiler actually provides + C++11 support before using it. + - Added advanced memory management primitives OFunique_ptr and OFshared_ptr + to support users in writing memory leak free code. + - Added support for move semantics, e.g. to transfer the ownership of an + OFunique_ptr. + - Added OFnumeric_limits to query information about fundamental arithmetic + types. + - Added type traits (OFenable_if etc.) to support template meta-programing. + - Added OFtuple as a more generic alternative to OFPair. + - Added OFoptional to connect the state information of optional values with + the actual value, e.g. for being used as function return value. + - Added OFvariant, a type safe tagged union to store different objects in + a single variable (not simultaneously) depending on runtime requirements. + - Added unit tests to ensure all above mentioned features really work. + +- Introduced platform independent defines for suppressing inappropriate compiler + diagnostic output (i.e. "warnings"). This mechanism is used to locally + suppress warnings that originate from the compiler misinterpreting the authors + intention, e.g. warnings when intentionally mixing "class" and "struct" for + template specialization to save typing "public" and "private". + +- Introduced several new modules: + + - "dcmrt" - implements support for the DICOM Radiation Therapy IODs + - "dcmiod" - eases IOD module composition and supports constraint checking + when reading and writing IODs and their modules. + - "dcmfg" - allows to represent Functional Groups in the source code. + - "dcmseg" - implements the segmentation IOD based on "dcmiod" and "dcmfg". + - "dcmtract" - offers a dedicated API to create and read DICOM Tractography + Results objects (introduced in DICOM Supplement 181). + - "dcmpmap" - for creating, saving and loading DICOM Parametric Maps objects + (introduced with Supplement 172). + +- Further enhanced DICOM Structured Reporting (SR) module "dcmsr": + + - Added the "dcmsr/cmr" submodule implementing support for parts of the DICOM + Content Mapping Resource (DCMR). + - Added support for SR templates by introducing two general classes for root + and non-root templates. + - Also added support for CP-1031 (Support long code values) and CP-1417 + (Clarify use and declaration of private mapping resource). + - Added support for the SR Template TID 1500 (Measurement Report) and included + subordinated Templates (e.g. TID 1001, 1204, 1600, 1411). + - Also added support for all required Context Groups and Code definitions, i.e. + from DICOM, NCIt, SNOMED, UCUM, and UMLS coding scheme. + - Added support for the new Acquisition Context SR IOD, Comprehensive 3D SR + IOD, Implantation Plan SR Document IOD, Radiopharmaceutical Radiation Dose + SR IOD, Simplified Adult Echo SR IOD and Spectacle Prescription Report IOD. + - Further improved handling of incorrectly encoded DICOM SR documents. + - Many further improvements in order to stay up-to-date with development of + the DICOM standard and to make it easier to create, read, write, and modify + SR documents. + +- Introduced several new command line tools: + + - "getscu" - a C-GET Service Class User. + - "dcmsend" - a Simple Storage Service Class User, based on new class + "DcmStorageSCU". + - "dcmrecv" - alternative to storescp with focus on easy use, based on new + class "DcmStorageSCP". + - "dcm2json" - converts DICOM files to DICOM's official JSON encoding. + +- Added threading functionality to DcmSCP via thread pool classes. + +- Added new output format to dcm2xml: the Native DICOM Model according to + part 19 of the DICOM standard ("Application Hosting"). + +- Added support for 16 bits per sample to PNG image export. + +- Significantly enhanced performance of the DICOMDIR code for reading and + writing such files. Also added support for all new Directory Record Types. + +- Added support for new Return Key Attributes to the "wlmscpfs", which are + required for the IHE Eye Care Workflow. + +- Introduced advanced parameterization methods for DCMTLS. + +- Improved data dictionary configuration options and handling. + +- Added support for new Value Representations "Other Double" (OD), "Other Long" + (OL), "Unlimited Characters" (UC) and "Universal Resource Identifiers/Locators + (URI/URL)" (UR). + +- Added support for three new DICOS Storage SOP Classes from the DICOM-related + DICOS (Digital Imaging and Communications in Security) standard. + +- Added additional matching keys to dcmqrdb and dcmwlm: StudyDate, StudyTime and + IssuerOfPatientID. + +- Updated data dictionary, SOP Class and Transfer Syntax UIDs for the recently + approved changes to the DICOM standard (i.e. Supplements and CPs), up to DICOM + standard release DICOM 2017b. + +- Added support for additional MPEG4 transfer syntaxes to several command line + programs. + +- Enhanced support for DICOM Non-Patient Objects, e.g. allow for transferring + them using the standard networking tools. + +- DCMTK now supports compiling with OpenSSL 1.1.x; support for some older, + insecure TLS cipher suites has been removed. + +- The JPEG encoder now implements DICOM CP 1447, i.e. always writes a SOF1 + marker into the JPEG bitstream in extended sequential mode. + +- The socket timeout used for send() and recv() is now configurable (at + runtime); further fixes and enhancements to networking basics. + +- Revised implementation of class OFCondition in order to avoid issues with + static initialization order. + +- Fixed various issues that occurred after the official 3.6.0 release. + Many people have contributed to this new release of DCMTK, appearing here in alphabetical order. Thank you very much for your support! - [...] + Alexander Haderer + Alexander Karaivanov + Andrei Terechko + Andrey Fedorov + Anne-Gaelle Berge + Bhuvan Bose + Bill Lorensen + Brad Jascob + Bruno Milutin + Carmen Avram + Christian Fremgen + Christian Herz + Christian Wetzel + Daniele Giunchi + David Clunie + Detlev Hohmeier + Dimitri Papadopoulos + Dr. Martin Korp + Dr. Michael Heber + Eric A. Borisch + David Flade + Fred Stegemann + Fu Peng + Gareth Sylvester-Bradley + Gary Carter + Gigante + Grzegorz Chlebus + Hanno Hugenberg + Hans J. Johnson + Hans Kluijtmans + Hector Marco + Heyo Spekker + Hüseyin Kozan + Ing-Long Eric Kuo + Jean-Christophe Fillion-Robin + Jeroen Eggermont + John Stark + Julien Finet + Kent Williams + Kornelius Sohn + Lin Qi Ruan + Marco Nolden + Mario Ceresa + Markus Konrad + Markus Mertens + Martin Wenger + Mathieu Malaterre + Matt McCormick + Michael Knopke + Michael Schinner + Michal Spacek + Niels Dekker + Paolo Marcheschi + Per Inge Mathisen + Peter Hille + Peter Klotz + Pietro Cerutti + Rasmus Christian Pedersen + Richard Flay + Robert Habrich + Stacy Loesch + Takeo Satomi + Tamas Nemeth + Thomas Puckett + Thomas Sondergaard + Tiago D'Agostini + Tilman Vogel + Timothy Pitt + Waldir Pimenta + Wang Qiang + Yves Neumann + + Forum user "AlexanderLysenko" + Forum user "andreasb" + Forum user "angad" + Forum user "aprogrammer" + Forum user "bibble_235" + Forum user "budric" + Forum user "chaircrusher" + Forum user "coach4ae" + Forum user "dimitri" + Forum user "flang" + Forum user "Geof" + Forum user "gerhardh" + Forum user "ghleclerc" + Forum user "HackerNeo" + Forum user "henry" + Forum user "Hua Cong Danh" + Forum user "ichimura.t" + Forum user "ionut.vaida" + Forum user "jacobf" + Forum user "jacobscolin" + Forum user "jakecobb" + Forum user "kosborn" + Forum user "kron24" + Forum user "lars_matthaeus" + Forum user "Luuk" + Forum user "maleike" + Forum user "martinrame" + Forum user "Matterhorn" + Forum user "merlin" + Forum user "michael12345" + Forum user "nikkoara" + Forum user "nmoraes" + Forum user "oblivion81" + Forum user "oxymoron" + Forum user "Paul Groot" + Forum user "Per" + Forum user "poupofa" + Forum user "psih128" + Forum user "Rich in Soquel" + Forum user "sfzhang" + Forum user "Shaeto" + Forum user "spasmous" + Forum user "st80rules" + Forum user "Tim" + Forum user "tpalagyi" + Forum user "vlad" + Forum user "vsalomoni" + Forum user "wollet88" + Forum user "wrenashe" + Forum user "xcoder" + Forum user "ymartelli" + Forum user "yueran" + Forum user "Yves Neumann" + Forum user "zaq" + +Members of the DCMTK Team who have worked on this release are +(in alphabetical order): + + Marco Eichelberg + Michael Onken + Joerg Riesmeier + Jan Schlamelcher + +Student associates: -Members of the OFFIS DICOM Team who have worked on this release are: + Nikolas Goldhammer + Sebastian Grallert + Thorben Hasenpusch + Uli Schlachter - [...] +Also see CREDITS file for projects and companies who have been generously +supporting DCMTK. The DCMTK software can be downloaded via: http://dicom.offis.de/dcmtk or http://www.dcmtk.org/ -OFFIS e.V., Oldenburg, Germany, 2011-02-01 +OFFIS e.V., Oldenburg, Germany, 2017-07-14 diff --git a/CHANGES b/CHANGES index 1eb7feb2..b7fc0655 100644 --- a/CHANGES +++ b/CHANGES @@ -3,10 +3,10 @@ In earlier versions of DCMTK, changes between releases had been documented in a CHANGES.XXX file inside DCMTK's main directory. Now, the CHANGES.XXX file has been moved to the dcmtk/doc folder with the latest -one being updated every time that a new snapshot is released. Thus it always -contains all DCMTK changes between the last DCMTK release and the latest -snapshot. +one being updated every time that a new DCMTK version is released. Thus it +always contains all DCMTK changes between the last DCMTK release and the most +recent one. For very recent changes, i. e. those changes to DCMTK that have been applied -after release of the latest snapshot, see the DCMTK git repository log at +after the most recent release, see the DCMTK git repository log at http://git.dcmtk.org/ . diff --git a/CMake/3rdparty.cmake b/CMake/3rdparty.cmake index eedce5f0..8caa1d91 100644 --- a/CMake/3rdparty.cmake +++ b/CMake/3rdparty.cmake @@ -5,42 +5,44 @@ IF(WIN32 AND NOT MINGW) # website (pre-built). # libxml support: find out whether user has library - GET_FILENAME_COMPONENT(LIBXML_DIR "${DCMTK_SOURCE_DIR}/../libxml2-2.7.7" ABSOLUTE) + FILE(GLOB LIBXML_DIR "${DCMTK_SOURCE_DIR}/../libxml2*") FIND_PATH(WITH_LIBXMLINC "/include/libxml/parser.h" "${LIBXML_DIR}" NO_DEFAULT_PATH) # libpng support: find out whether user has library - GET_FILENAME_COMPONENT(LIBPNG_DIR "${DCMTK_SOURCE_DIR}/../libpng-1.4.2" ABSOLUTE) + FILE(GLOB LIBPNG_DIR "${DCMTK_SOURCE_DIR}/../libpng*") FIND_PATH(WITH_LIBPNGINC "include/png.h" "${LIBPNG_DIR}" NO_DEFAULT_PATH) # libtiff support: find out whether user has library - GET_FILENAME_COMPONENT(LIBTIFF_DIR "${DCMTK_SOURCE_DIR}/../tiff-3.9.2" ABSOLUTE) + FILE(GLOB LIBTIFF_DIR "${DCMTK_SOURCE_DIR}/../libtiff*") FIND_PATH(WITH_LIBTIFFINC "include/tiff.h" "${LIBTIFF_DIR}" NO_DEFAULT_PATH) # OpenSSL support: find out whether user has library - GET_FILENAME_COMPONENT(OPENSSL_DIR "${DCMTK_SOURCE_DIR}/../openssl-1.0.0" ABSOLUTE) + FILE(GLOB OPENSSL_DIR "${DCMTK_SOURCE_DIR}/../openssl*") FIND_PATH(WITH_OPENSSLINC "include/openssl/ssl.h" "${OPENSSL_DIR}" NO_DEFAULT_PATH) # zlib support: find out whether user has library - GET_FILENAME_COMPONENT(ZLIB_DIR "${DCMTK_SOURCE_DIR}/../zlib-1.2.5" ABSOLUTE) + FILE(GLOB ZLIB_DIR "${DCMTK_SOURCE_DIR}/../zlib*") FIND_PATH(WITH_ZLIBINC "include/zlib.h" "${ZLIB_DIR}" NO_DEFAULT_PATH) # sndfile support: find out whether user has library. Needed for module dcmwave (not in public DCMTK yet, marked as advanced) - GET_FILENAME_COMPONENT(SNDFILE_DIR "${DCMTK_SOURCE_DIR}/../libsndfile-1.0.17" ABSOLUTE) + FILE(GLOB SNDFILE_DIR "${DCMTK_SOURCE_DIR}/../libsndfile*") FIND_PATH(WITH_SNDFILEINC "sndfile.h" "${SNDFILE_DIR}" NO_DEFAULT_PATH) MARK_AS_ADVANCED(SNDFILE_DIR WITH_SNDFILEINC) # libiconv support: find out whether user has library - GET_FILENAME_COMPONENT(LIBICONV_DIR "${DCMTK_SOURCE_DIR}/../libiconv-1.14" ABSOLUTE) + FILE(GLOB LIBICONV_DIR "${DCMTK_SOURCE_DIR}/../libiconv*") FIND_PATH(WITH_LIBICONVINC "include/iconv.h" "${LIBICONV_DIR}" NO_DEFAULT_PATH) # libxml support: configure compiler IF(DCMTK_WITH_XML) IF(WITH_LIBXMLINC) - SET(LIBXML_INCDIR ${WITH_LIBXMLINC}/include) - SET(LIBXML_LIBDIR ${WITH_LIBXMLINC}/lib) - SET(LIBXML_LIBS debug ${LIBXML_LIBDIR}/libxml2_d.lib optimized ${LIBXML_LIBDIR}/libxml2_o.lib debug ${LIBXML_LIBDIR}/iconv_d.lib optimized ${LIBXML_LIBDIR}/iconv_o.lib) + SET(LIBXML_INCDIR "${WITH_LIBXMLINC}/include") + SET(LIBXML_LIBDIR "${WITH_LIBXMLINC}/lib") + SET(LIBXML_LIBS debug "${LIBXML_LIBDIR}/libxml2_d.lib" optimized "${LIBXML_LIBDIR}/libxml2_o.lib" debug "${LIBXML_LIBDIR}/iconv_d.lib" optimized "${LIBXML_LIBDIR}/iconv_o.lib") MESSAGE(STATUS "Info: DCMTK XML support will be enabled") SET(WITH_LIBXML 1) + # this hides some warnings that are emitted when linking against libxmlXXX.lib instead of linking the DLL directly + ADD_DEFINITIONS("-DLIBXML_STATIC") ELSE(WITH_LIBXMLINC) # turn off library if library path not set MESSAGE(STATUS "Warning: XML support will be disabled because libxml2 directory is not specified. Correct path and re-enable DCMTK_WITH_XML.") SET(DCMTK_WITH_XML OFF CACHE BOOL "" FORCE) @@ -51,9 +53,9 @@ IF(WIN32 AND NOT MINGW) # libpng support: configure compiler IF(DCMTK_WITH_PNG) IF(WITH_LIBPNGINC) - SET(LIBPNG_INCDIR ${WITH_LIBPNGINC}/include) - SET(LIBPNG_LIBDIR ${WITH_LIBPNGINC}/lib) - SET(LIBPNG_LIBS debug ${LIBPNG_LIBDIR}/libpng_d.lib optimized ${LIBPNG_LIBDIR}/libpng_o.lib) + SET(LIBPNG_INCDIR "${WITH_LIBPNGINC}/include") + SET(LIBPNG_LIBDIR "${WITH_LIBPNGINC}/lib") + SET(LIBPNG_LIBS debug "${LIBPNG_LIBDIR}/libpng_d.lib" optimized "${LIBPNG_LIBDIR}/libpng_o.lib") MESSAGE(STATUS "Info: DCMTK PNG support will be enabled") SET(WITH_LIBPNG 1) ELSE(WITH_LIBPNGINC) # turn off library if library path not set @@ -66,9 +68,9 @@ IF(WIN32 AND NOT MINGW) # libtiff support: configure compiler IF(DCMTK_WITH_TIFF) IF(WITH_LIBTIFFINC) - SET(LIBTIFF_INCDIR ${WITH_LIBTIFFINC}/include) - SET(LIBTIFF_LIBDIR ${WITH_LIBTIFFINC}/lib) - SET(LIBTIFF_LIBS debug ${LIBTIFF_LIBDIR}/libtiff_d.lib optimized ${LIBTIFF_LIBDIR}/libtiff_o.lib) + SET(LIBTIFF_INCDIR "${WITH_LIBTIFFINC}/include") + SET(LIBTIFF_LIBDIR "${WITH_LIBTIFFINC}/lib") + SET(LIBTIFF_LIBS debug "${LIBTIFF_LIBDIR}/libtiff_d.lib" optimized "${LIBTIFF_LIBDIR}/libtiff_o.lib") MESSAGE(STATUS "Info: DCMTK TIFF support will be enabled") SET(WITH_LIBTIFF 1) ELSE(WITH_LIBTIFFINC) # turn off library if library path not set @@ -81,10 +83,10 @@ IF(WIN32 AND NOT MINGW) # OpenSSL support: configure compiler IF(DCMTK_WITH_OPENSSL) IF(WITH_OPENSSLINC) - SET(OPENSSL_BINDIR ${WITH_OPENSSLINC}/bin) - SET(OPENSSL_INCDIR ${WITH_OPENSSLINC}/include) - SET(OPENSSL_LIBDIR ${WITH_OPENSSLINC}/lib) - SET(OPENSSL_LIBS debug ${OPENSSL_LIBDIR}/dcmtkssl_d.lib optimized ${OPENSSL_LIBDIR}/dcmtkssl_o.lib debug ${OPENSSL_LIBDIR}/dcmtkeay_d.lib optimized ${OPENSSL_LIBDIR}/dcmtkeay_o.lib) + SET(OPENSSL_BINDIR "${WITH_OPENSSLINC}/bin") + SET(OPENSSL_INCDIR "${WITH_OPENSSLINC}/include") + SET(OPENSSL_LIBDIR "${WITH_OPENSSLINC}/lib") + SET(OPENSSL_LIBS debug "${OPENSSL_LIBDIR}/dcmtkssl_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkssl_o.lib" debug "${OPENSSL_LIBDIR}/dcmtkcrypto_d.lib" optimized "${OPENSSL_LIBDIR}/dcmtkcrypto_o.lib") MESSAGE(STATUS "Info: DCMTK OPENSSL support will be enabled") SET(WITH_OPENSSL 1) ELSE(WITH_OPENSSLINC) # turn off library if library path not set @@ -97,9 +99,9 @@ IF(WIN32 AND NOT MINGW) # zlib support: configure compiler IF(DCMTK_WITH_ZLIB) IF(WITH_ZLIBINC) - SET(ZLIB_INCDIR ${WITH_ZLIBINC}/include) - SET(ZLIB_LIBDIR ${WITH_ZLIBINC}/lib) - SET(ZLIB_LIBS debug ${ZLIB_LIBDIR}/zlib_d.lib optimized ${ZLIB_LIBDIR}/zlib_o.lib) + SET(ZLIB_INCDIR "${WITH_ZLIBINC}/include") + SET(ZLIB_LIBDIR "${WITH_ZLIBINC}/lib") + SET(ZLIB_LIBS debug "${ZLIB_LIBDIR}/zlib_d.lib" optimized "${ZLIB_LIBDIR}/zlib_o.lib") MESSAGE(STATUS "Info: DCMTK ZLIB support will be enabled") SET(WITH_ZLIB 1) ELSE(WITH_ZLIBINC) # turn off library if library path not set @@ -112,9 +114,9 @@ IF(WIN32 AND NOT MINGW) # sndfile support: configure compiler IF(DCMTK_WITH_SNDFILE) IF(WITH_SNDFILEINC) - SET(SNDFILE_INCDIR ${WITH_SNDFILEINC}/include) - SET(SNDFILE_LIBDIR ${WITH_SNDFILEINC}/lib) - SET(SNDFILE_LIBS debug ${SNDFILE_LIBDIR}/libsndfile_d.lib optimized ${SNDFILE_LIBDIR}/libsndfile_o.lib) + SET(SNDFILE_INCDIR "${WITH_SNDFILEINC}/include") + SET(SNDFILE_LIBDIR "${WITH_SNDFILEINC}/lib") + SET(SNDFILE_LIBS debug "${SNDFILE_LIBDIR}/libsndfile_d.lib" optimized "${SNDFILE_LIBDIR}/libsndfile_o.lib") MESSAGE(STATUS "Info: DCMTK SNDFILE support will be enabled") SET(WITH_SNDFILE 1) ELSE(WITH_SNDFILEINC) # turn off library if library path not set @@ -127,9 +129,9 @@ IF(WIN32 AND NOT MINGW) # libiconv support: configure compiler IF(DCMTK_WITH_ICONV) IF(WITH_LIBICONVINC) - SET(LIBICONV_INCDIR ${WITH_LIBICONVINC}/include) - SET(LIBICONV_LIBDIR ${WITH_LIBICONVINC}/lib) - SET(LIBICONV_LIBS debug ${LIBICONV_LIBDIR}/libiconv_d.lib optimized ${LIBICONV_LIBDIR}/libiconv_o.lib) + SET(LIBICONV_INCDIR "${WITH_LIBICONVINC}/include") + SET(LIBICONV_LIBDIR "${WITH_LIBICONVINC}/lib") + SET(LIBICONV_LIBS debug "${LIBICONV_LIBDIR}/libiconv_d.lib" optimized "${LIBICONV_LIBDIR}/libiconv_o.lib") MESSAGE(STATUS "Info: DCMTK ICONV support will be enabled") SET(WITH_LIBICONV 1) ELSE(WITH_LIBICONVINC) # turn off library if library path not set @@ -281,7 +283,7 @@ IF(NOT DEFINED DCMTK_WITH_STDLIBC_ICONV) ENDIF(NOT DEFINED DCMTK_WITH_STDLIBC_ICONV) IF(DCMTK_WITH_ICU) - FIND_PACKAGE(ICU) + FIND_PACKAGE(ICU COMPONENTS uc data QUIET) IF(NOT ICU_FOUND) MESSAGE(STATUS "Warning: ICU support will be disabled because the ICU were not found.") SET(DCMTK_WITH_ICU OFF CACHE BOOL "" FORCE) diff --git a/CMake/CTest/CTestCustom.cmake b/CMake/CTest/CTestCustom.cmake deleted file mode 100644 index d8f051d4..00000000 --- a/CMake/CTest/CTestCustom.cmake +++ /dev/null @@ -1,79 +0,0 @@ -# -# This file is run prior to the unit tests for preparing the testing -# environment. Currently only required / necessary for running the -# tests on the Android device emulator. -# - -# Restore the required settings of the CMake configuration step -INCLUDE(dcmtkCTestConfig.cmake NO_POLICY_SCOPE) - -# Emulate some required CMake commands while running inside CTest -INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/CTest/dcmtkCTestMacros.cmake) - -# Prepare the Android testing environment -IF(ANDROID) - # Load required functions for controlling the Android device emulator - INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake) - - # Prepare the emulator - DCMTK_ANDROID_START_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE) - DCMTK_ANDROID_WAIT_FOR_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE) - - # Get the emulator's name for emitting a shutdown command when done - DCMTK_ANDROID_GET_OBJECT_PROPERTIES(DCMTK_ANDROID_EMULATOR_INSTANCE) - DCMTK_ANDROID_STOP_EMULATOR_COMMAND(STOP_EMULATOR ${EMULATOR_NAME}) - DCMTK_ANDROID_EMULATOR_SHUTDOWN_MESSAGE(STOP_MESSAGE) - MESSAGE_COMMAND(STOP_MESSAGE ${STOP_MESSAGE}) - # CTEST_CUSTOM_POST_TESTS executes a sequence of 'non CMake' commands separated - # by ';' characters. Therefore the sequence a single command consists of must - # be translated appropriately first - STRING(REPLACE ";" " " STOP_EMULATOR "${STOP_EMULATOR}") - STRING(REPLACE ";" " " STOP_MESSAGE "${STOP_MESSAGE}") - SET(CLEANUP_COMMAND "${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkCTestRunAndroid.cmake") - # Register the cleanup hooks - SET(CTEST_CUSTOM_POST_TEST "${CLEANUP_COMMAND}" "${STOP_MESSAGE}" "${STOP_EMULATOR}") - - # Prepare the test script, most importantly set the current emulator instance handle - CONFIGURE_FILE( - ${DCMTK_CMAKE_INCLUDE}CMake/CTest/dcmtkCTestRunAndroid.cmake.in - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkCTestRunAndroid.cmake - @ONLY - ) - - # Collect the list of required libraries - IF(BUILD_SHARED_LIBS) - FOREACH(LIBRARY ${DCMTK_ALL_LIBRARIES}) - LIST(APPEND DCMTK_CREATED_SHARED_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_PACKAGE_VERSION}) - ENDFOREACH() - ENDIF(BUILD_SHARED_LIBS) - - # Transmit the required executables and libraries to the emulator - DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE - ${ANDROID_RUNTIME_LIBRARIES} - ${DCMTK_LIBRARY_DEPENDENCIES} - ${DCMTK_CREATED_SHARED_LIBRARIES} - ${DCMTK_TEST_EXECUTABLES} - DESTINATION ${ANDROID_TEMPORARY_FILES_LOCATION} - ) - - # Set executable permissions - FOREACH(TEST_EXECUTABLE ${DCMTK_TEST_EXECUTABLES}) - GET_FILENAME_COMPONENT(NAME ${TEST_EXECUTABLE} NAME) - DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE - COMMAND chmod 755 ${ANDROID_TEMPORARY_FILES_LOCATION}/${NAME} - OUTPUT_QUIET - ERROR_QUIET - ) - ENDFOREACH() - - # Create necessary softlinks - IF(BUILD_SHARED_LIBS) - FOREACH(LIBRARY ${DCMTK_ALL_LIBRARIES}) - DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE - COMMAND ln -s ./${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_PACKAGE_VERSION} ${ANDROID_TEMPORARY_FILES_LOCATION}/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_ABI_VERSION} - OUTPUT_QUIET - ERROR_QUIET - ) - ENDFOREACH() - ENDIF(BUILD_SHARED_LIBS) -ENDIF(ANDROID) diff --git a/CMake/CTest/CTestCustomAndroid.cmake.in b/CMake/CTest/CTestCustomAndroid.cmake.in new file mode 100644 index 00000000..2b93e0b2 --- /dev/null +++ b/CMake/CTest/CTestCustomAndroid.cmake.in @@ -0,0 +1,98 @@ +# +# This file is run prior to the unit tests for preparing the testing +# environment. Currently only required / necessary for running the +# tests on the Android device emulator. +# + +# Restore the required settings of the CMake configuration step +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +SET(CMAKE_COMMAND "@CMAKE_COMMAND@") +SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@") +SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_BINARY_DIR@") +SET(CMAKE_FILES_DIRECTORY "@CMAKE_FILES_DIRECTORY@") +SET(CMAKE_MODULE_PATH "@CMAKE_ROOT@/Modules") +SET(CMAKE_SHARED_LIBRARY_PREFIX "@CMAKE_SHARED_LIBRARY_PREFIX@") +SET(CMAKE_SHARED_LIBRARY_SUFFIX "@CMAKE_SHARED_LIBRARY_SUFFIX@") +SET(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@") +SET(DCMTK_CMAKE_INCLUDE "@CMAKE_SOURCE_DIR@/@DCMTK_CMAKE_INCLUDE@") +SET(DCMTK_TEST_EXECUTABLES "@DCMTK_TEST_EXECUTABLES@") +SET(DCMTK_ALL_LIBRARIES "@DCMTK_ALL_LIBRARIES@") +SET(DCMTK_LIBRARY_DEPENDENCIES "@DCMTK_LIBRARY_DEPENDENCIES@") +SET(DCMTK_PACKAGE_VERSION "@DCMTK_PACKAGE_VERSION@") +SET(DCMTK_ABI_VERSION "@DCMTK_ABI_VERSION@") +SET(BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@") +SET(DCMTK_DICOM_DICTIONARIES "@DCMTK_DICOM_DICTIONARIES@") +SET(ANDROID "@ANDROID@") +SET(ANDROID_ADB_PROGRAM "@ANDROID_ADB_PROGRAM@") +SET(ANDROID_ANDROID_PROGRAM "@ANDROID_ANDROID_PROGRAM@") +SET(ANDROID_EMULATOR_PROGRAM "@ANDROID_EMULATOR_PROGRAM@") +SET(ANDROID_EMULATOR_AVD "@ANDROID_EMULATOR_AVD@") +SET(ANDROID_RUNTIME_LIBRARIES "@ANDROID_RUNTIME_LIBRARIES@") +SET(ANDROID_TEMPORARY_FILES_LOCATION "@ANDROID_TEMPORARY_FILES_LOCATION@") +# Emulate some required CMake commands while running inside CTest +INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/CTest/dcmtkCTestMacros.cmake) +# For DCMTK_UNSET_XXX +INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkMacros.cmake) +# Load required functions for controlling the Android device emulator +INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake) + +# Prepare the Android testing environment +# Prepare the emulator +DCMTK_ANDROID_START_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE) +DCMTK_ANDROID_WAIT_FOR_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE) + +# Get the emulator's name for emitting a shutdown command when done +DCMTK_ANDROID_GET_OBJECT_PROPERTIES(DCMTK_ANDROID_EMULATOR_INSTANCE) +DCMTK_ANDROID_STOP_EMULATOR_COMMAND(STOP_EMULATOR "${EMULATOR_NAME}") +DCMTK_ANDROID_EMULATOR_SHUTDOWN_MESSAGE(STOP_MESSAGE) +# Note: no quotation marks around STOP_MESSAGE, since it contains the message +# and the message type (e.g. STATUS) +MESSAGE_COMMAND(STOP_MESSAGE ${STOP_MESSAGE}) +# CTEST_CUSTOM_POST_TESTS executes a sequence of 'non CMake' commands separated +# by ';' characters. Therefore the sequence a single command consists of must +# be translated appropriately first +STRING(REPLACE ";" " " STOP_EMULATOR "${STOP_EMULATOR}") +STRING(REPLACE ";" " " STOP_MESSAGE "${STOP_MESSAGE}") +# Register the cleanup hooks +SET(CTEST_CUSTOM_POST_TEST "${STOP_MESSAGE}" "${STOP_EMULATOR}") + +# Set the current emulator instance handle via an environment variable +SET(ENV{DCMTK_ANDROID_EMULATOR_INSTANCE} "${DCMTK_ANDROID_EMULATOR_INSTANCE}") + +# Collect the list of required libraries +IF(BUILD_SHARED_LIBS) + FOREACH(LIBRARY ${DCMTK_ALL_LIBRARIES}) + LIST(APPEND DCMTK_CREATED_SHARED_LIBRARIES "${CMAKE_BINARY_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_PACKAGE_VERSION}") + ENDFOREACH() +ENDIF(BUILD_SHARED_LIBS) + +# Transmit the required executables, libraries and dictionaries to the emulator +DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE + ${ANDROID_RUNTIME_LIBRARIES} + ${DCMTK_LIBRARY_DEPENDENCIES} + ${DCMTK_CREATED_SHARED_LIBRARIES} + ${DCMTK_TEST_EXECUTABLES} + ${DCMTK_DICOM_DICTIONARIES} + DESTINATION ${ANDROID_TEMPORARY_FILES_LOCATION} +) + +# Set executable permissions +FOREACH(TEST_EXECUTABLE ${DCMTK_TEST_EXECUTABLES}) + GET_FILENAME_COMPONENT(NAME "${TEST_EXECUTABLE}" NAME) + DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE + COMMAND chmod 755 "${ANDROID_TEMPORARY_FILES_LOCATION}/${NAME}" + OUTPUT_QUIET + ERROR_QUIET + ) +ENDFOREACH() + +# Create necessary softlinks +IF(BUILD_SHARED_LIBS) + FOREACH(LIBRARY ${DCMTK_ALL_LIBRARIES}) + DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE + COMMAND ln -s "./${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_PACKAGE_VERSION}" "${ANDROID_TEMPORARY_FILES_LOCATION}/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_ABI_VERSION}" + OUTPUT_QUIET + ERROR_QUIET + ) + ENDFOREACH() +ENDIF(BUILD_SHARED_LIBS) diff --git a/CMake/CTest/CTestCustomWine.cmake.in b/CMake/CTest/CTestCustomWine.cmake.in new file mode 100644 index 00000000..4ec2eb39 --- /dev/null +++ b/CMake/CTest/CTestCustomWine.cmake.in @@ -0,0 +1,17 @@ +# +# This file ensures that the wineserver is spawned before running the unit +# tests, such that CTest will not attach itself to it. This is an ugly hack +# workaround, but what can you do? +# + +SET(ENV{WINEPREFIX} "@DCMTK_WINEPREFIX@") +SET(ENV{DCMDICTPATH} "@DCMDICTPATH@") +SET(WINE_WINE_PROGRAM "@WINE_WINE_PROGRAM@") + +# spawn the winserver using 'cmd /C call' -> effectively NOP +# spawn it using 'sh', such that this script does not attach itself to it. +EXECUTE_PROCESS(COMMAND + sh -c "\"${WINE_WINE_PROGRAM}\" cmd /C call" + OUTPUT_FILE "/dev/null" + ERROR_FILE "/dev/null" +) diff --git a/CMake/CTest/dcmtkCTestConfig.cmake.in b/CMake/CTest/dcmtkCTestConfig.cmake.in deleted file mode 100644 index 69ae53b7..00000000 --- a/CMake/CTest/dcmtkCTestConfig.cmake.in +++ /dev/null @@ -1,36 +0,0 @@ -# -# This file is used to recover the necessary CMake cache variables while -# running the unit tests. -# - -# Minimum CMake version required -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -SET(CMAKE_COMMAND "@CMAKE_COMMAND@") -SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@") -SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_BINARY_DIR@") -SET(CMAKE_FILES_DIRECTORY "@CMAKE_FILES_DIRECTORY@") -SET(CMAKE_MODULE_PATH "@CMAKE_ROOT@/Modules") -SET(CMAKE_SHARED_LIBRARY_PREFIX "@CMAKE_SHARED_LIBRARY_PREFIX@") -SET(CMAKE_SHARED_LIBRARY_SUFFIX "@CMAKE_SHARED_LIBRARY_SUFFIX@") -SET(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@") -SET(DCMTK_CMAKE_INCLUDE "@CMAKE_SOURCE_DIR@/@DCMTK_CMAKE_INCLUDE@") -SET(DCMTK_TEST_EXECUTABLES "@DCMTK_TEST_EXECUTABLES@") -SET(DCMTK_ALL_LIBRARIES "@DCMTK_ALL_LIBRARIES@") -SET(DCMTK_LIBRARY_DEPENDENCIES "@DCMTK_LIBRARY_DEPENDENCIES@") -SET(DCMTK_PACKAGE_VERSION "@DCMTK_PACKAGE_VERSION@") -SET(DCMTK_ABI_VERSION "@DCMTK_ABI_VERSION@") -SET(BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@") - -# Variables used when cross compiling for Android, will be unset otherwise -SET(ANDROID "@ANDROID@") -IF(ANDROID) - SET(ANDROID_ADB_PROGRAM "@ANDROID_ADB_PROGRAM@") - SET(ANDROID_ANDROID_PROGRAM "@ANDROID_ANDROID_PROGRAM@") - SET(ANDROID_EMULATOR_PROGRAM "@ANDROID_EMULATOR_PROGRAM@") - SET(ANDROID_EMULATOR_AVD "@ANDROID_EMULATOR_AVD@") - SET(ANDROID_RUNTIME_LIBRARIES "@ANDROID_RUNTIME_LIBRARIES@") - SET(ANDROID_TEMPORARY_FILES_LOCATION "@ANDROID_TEMPORARY_FILES_LOCATION@") -ELSE(ANDROID) - UNSET(ANDROID) -ENDIF(ANDROID) diff --git a/CMake/CTest/dcmtkCTestRun.cmake.in b/CMake/CTest/dcmtkCTestRun.cmake.in new file mode 100644 index 00000000..603f7266 --- /dev/null +++ b/CMake/CTest/dcmtkCTestRun.cmake.in @@ -0,0 +1,18 @@ +# +# This file is used to executed given unit test commands locally, handling +# additional arguments like 'exhaustive' and setting the DCMDICTPATH +# environment variable appropriately. +# + +SET(ENV{DCMDICTPATH} "@DCMDICTPATH@") + +EXECUTE_PROCESS(COMMAND + "${DCMTK_CTEST_TESTCASE_COMMAND}" ${DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}" + RESULT_VARIABLE RESULT +) + +# We cannot forward the result value to CMake, so print it instead and let CMake +# return with code '1' or whatever it deems appropriate to notify about an error. +IF(RESULT) + MESSAGE(FATAL_ERROR "Test command returned: ${RESULT}") +ENDIF() diff --git a/CMake/CTest/dcmtkCTestRunAndroid.cmake.in b/CMake/CTest/dcmtkCTestRunAndroid.cmake.in index 4cc1dcac..819fd318 100644 --- a/CMake/CTest/dcmtkCTestRunAndroid.cmake.in +++ b/CMake/CTest/dcmtkCTestRunAndroid.cmake.in @@ -1,25 +1,32 @@ # # This file is used to executed given unit test commands on a previously -# initialize Android device emulator instance +# initialize Android device emulator instance, handling additional arguments +# like 'exhaustive' and setting the DCMDICTPATH environment variable +# appropriately. # # Restore the required settings of the CMake configuration step -INCLUDE(@CMAKE_BINARY_DIR@/dcmtkCTestConfig.cmake NO_POLICY_SCOPE) - -# Load required functions for accessing the Android device emulator +SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@") +SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_BINARY_DIR@") +SET(CMAKE_FILES_DIRECTORY "@CMAKE_FILES_DIRECTORY@") +SET(DCMTK_CMAKE_INCLUDE "@CMAKE_SOURCE_DIR@/@DCMTK_CMAKE_INCLUDE@") +SET(DCMDICTPATH "@DCMDICTPATH@") +SET(ANDROID_ADB_PROGRAM "@ANDROID_ADB_PROGRAM@") +SET(ANDROID_TEMPORARY_FILES_LOCATION "@ANDROID_TEMPORARY_FILES_LOCATION@") +# Load required functions for controlling the Android device emulator INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake) # Restore the Android device emulator instance handle -SET(DCMTK_ANDROID_EMULATOR_INSTANCE @DCMTK_ANDROID_EMULATOR_INSTANCE@) +SET(DCMTK_ANDROID_EMULATOR_INSTANCE "$ENV{DCMTK_ANDROID_EMULATOR_INSTANCE}") # Run the actual testcase on the remote device DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE - COMMAND "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${ANDROID_TEMPORARY_FILES_LOCATION}" ${DCMTK_CTEST_TESTCASE_COMMAND} - WORKING_DIRECTORY ${ANDROID_TEMPORARY_FILES_LOCATION} + COMMAND "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${ANDROID_TEMPORARY_FILES_LOCATION}" "DCMDICTPATH=${DCMDICTPATH}" "${DCMTK_CTEST_TESTCASE_COMMAND}" ${DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}" + WORKING_DIRECTORY "${ANDROID_TEMPORARY_FILES_LOCATION}" RESULT_VARIABLE RESULT ) -# We cannot forward the result value to CMake, so print it instead and let CMake +# We cannot forward the result value to CTest, so print it instead and let CMake # return with code '1' or whatever it deems appropriate to notify about an error. IF(RESULT) MESSAGE(FATAL_ERROR "Test command returned: ${RESULT}") diff --git a/CMake/CTest/dcmtkCTestRunExhaustive.cmake b/CMake/CTest/dcmtkCTestRunExhaustive.cmake new file mode 100644 index 00000000..0c726368 --- /dev/null +++ b/CMake/CTest/dcmtkCTestRunExhaustive.cmake @@ -0,0 +1,6 @@ +# +# this file is used to execute the unit tests with the -x option injected +# + +SET(ENV{DCMTK_CTEST_EXTRA_ARGUMENTS} "-x") +EXECUTE_PROCESS(COMMAND ${CMAKE_CTEST_COMMAND}) diff --git a/CMake/CTest/dcmtkCTestRunWine.cmake.in b/CMake/CTest/dcmtkCTestRunWine.cmake.in new file mode 100644 index 00000000..e0e9a439 --- /dev/null +++ b/CMake/CTest/dcmtkCTestRunWine.cmake.in @@ -0,0 +1,23 @@ +# +# This file is used to executed given unit test commands using wine, handling +# additional arguments like 'exhaustive' and setting the DCMDICTPATH +# environment variable appropriately. It uses the prepared wineprefix to +# load the MinGW C++ runtime (stdc++.dll etc.) and helps to detach the +# wineserver process from CTest such that it does not hang waiting for it to +# shutdown. +# + +SET(ENV{WINEPREFIX} "@DCMTK_WINEPREFIX@") +SET(ENV{DCMDICTPATH} "@DCMDICTPATH@") +SET(WINE_WINE_PROGRAM "@WINE_WINE_PROGRAM@") + +EXECUTE_PROCESS(COMMAND + "${WINE_WINE_PROGRAM}" "${DCMTK_CTEST_TESTCASE_COMMAND}" ${DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}" + RESULT_VARIABLE RESULT +) + +# We cannot forward the result value to CMake, so print it instead and let CMake +# return with code '1' or whatever it deems appropriate to notify about an error. +IF(RESULT) + MESSAGE(FATAL_ERROR "Test command returned: ${RESULT}") +ENDIF() diff --git a/CMake/CheckFunctionWithHeaderExists.cmake b/CMake/CheckFunctionWithHeaderExists.cmake index e924c7f8..1b95ac48 100644 --- a/CMake/CheckFunctionWithHeaderExists.cmake +++ b/CMake/CheckFunctionWithHeaderExists.cmake @@ -28,17 +28,18 @@ MACRO(CHECK_FUNCTIONWITHHEADER_EXISTS SYMBOL FILES VARIABLE) MESSAGE(STATUS "Looking for prototype of ${SYMBOL}") TRY_COMPILE(${VARIABLE} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.cxx + "${CMAKE_BINARY_DIR}" + "${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.cxx" CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS} + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}" "${CHECK_SYMBOL_EXISTS_LIBS}" ${DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS} OUTPUT_VARIABLE OUTPUT) IF(${VARIABLE}) MESSAGE(STATUS "Looking for prototype of ${SYMBOL} - found") SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log" "Determining if the ${SYMBOL} " "exist passed with the following output:\n" "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.ccc:\n" @@ -46,7 +47,7 @@ MACRO(CHECK_FUNCTIONWITHHEADER_EXISTS SYMBOL FILES VARIABLE) ELSE(${VARIABLE}) MESSAGE(STATUS "Looking for prototype of ${SYMBOL} - not found.") SET(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log" "Determining if the ${SYMBOL} " "exist failed with the following output:\n" "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.cxx:\n" diff --git a/CMake/DCMTKConfig.cmake.in b/CMake/DCMTKConfig.cmake.in index 89188d27..b5746267 100644 --- a/CMake/DCMTKConfig.cmake.in +++ b/CMake/DCMTKConfig.cmake.in @@ -13,7 +13,7 @@ SET(DCMTK_BUILD_VERSION @DCMTK_BUILD_VERSION@) SET(DCMTK_MODULES "@DCMTK_MODULES@") SET(DCMTK_LIBRARIES "@DCMTK_LIBRARY_TARGETS@") -# DCMTK build options +# Optional DCMTK 3rd party libraries SET(DCMTK_WITH_TIFF @DCMTK_WITH_TIFF@) SET(DCMTK_WITH_PNG @DCMTK_WITH_PNG@) SET(DCMTK_WITH_XML @DCMTK_WITH_XML@) @@ -21,17 +21,31 @@ SET(DCMTK_WITH_ZLIB @DCMTK_WITH_ZLIB@) SET(DCMTK_WITH_OPENSSL @DCMTK_WITH_OPENSSL@) SET(DCMTK_WITH_SNDFILE @DCMTK_WITH_SNDFILE@) SET(DCMTK_WITH_ICONV @DCMTK_WITH_ICONV@) +SET(DCMTK_WITH_STDLIBC_ICONV @DCMTK_WITH_STDLIBC_ICONV@) +SET(DCMTK_WITH_ICU @DCMTK_WITH_ICU@) +SET(DCMTK_WITH_WRAP @DCMTK_WITH_WRAP@) +SET(DCMTK_WITH_DOXYGEN @DCMTK_WITH_DOXYGEN@) + +# Dictionary-related +SET(DCMTK_ENABLE_BUILTIN_DICTIONARY @DCMTK_ENABLE_BUILTIN_DICTIONARY@) +SET(DCMTK_ENABLE_EXTERNAL_DICTIONARY @DCMTK_ENABLE_EXTERNAL_DICTIONARY@) SET(DCMTK_ENABLE_PRIVATE_TAGS @DCMTK_ENABLE_PRIVATE_TAGS@) -SET(DCMTK_WITH_THREADS @DCMTK_WITH_THREADS@) + +# Compiler / standard library features +SET(DCMTK_ENABLE_CXX11 @DCMTK_ENABLE_CXX11@) +SET(DCMTK_CXX11_FLAGS @DCMTK_CXX11_FLAGS@) +SET(DCMTK_ENABLE_STL @DCMTK_ENABLE_STL@) # DCMTK shared libraries SET(DCMTK_SHARED_LIBRARIES @BUILD_SHARED_LIBS@) SET(DCMTK_SINGLE_SHARED_LIBRARY @BUILD_SINGLE_SHARED_LIBRARY@) # DCMTK additional options +SET(DCMTK_WITH_THREADS @DCMTK_WITH_THREADS@) SET(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS @DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS@) SET(DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS @DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS@) SET(DCMTK_WIDE_CHAR_MAIN_FUNCTION @DCMTK_WIDE_CHAR_MAIN_FUNCTION@) +SET(DCMTK_ENABLE_LFS @DCMTK_ENABLE_LFS@) SET_AND_CHECK(DCMTK_TARGETS "@PACKAGE_DCMTK_CMKDIR_CONFIG@/DCMTKTargets.cmake") diff --git a/CMake/DCMTKConfig.cmake26.in b/CMake/DCMTKConfig.old_cmake.in similarity index 67% rename from CMake/DCMTKConfig.cmake26.in rename to CMake/DCMTKConfig.old_cmake.in index 75cd8eb7..e68f027e 100644 --- a/CMake/DCMTKConfig.cmake26.in +++ b/CMake/DCMTKConfig.old_cmake.in @@ -14,9 +14,9 @@ SET(DCMTK_BUILD_VERSION @DCMTK_BUILD_VERSION@) # DCMTK libraries and modules SET(DCMTK_MODULES "@DCMTK_MODULES@") -SET(DCMTK_LIBRARIES "@DCMTK_ALL_LIBRARIES@") +SET(DCMTK_LIBRARIES "@DCMTK_LIBRARY_TARGETS@") -# DCMTK build options +# Optional DCMTK 3rd party libraries SET(DCMTK_WITH_TIFF @DCMTK_WITH_TIFF@) SET(DCMTK_WITH_PNG @DCMTK_WITH_PNG@) SET(DCMTK_WITH_XML @DCMTK_WITH_XML@) @@ -24,14 +24,28 @@ SET(DCMTK_WITH_ZLIB @DCMTK_WITH_ZLIB@) SET(DCMTK_WITH_OPENSSL @DCMTK_WITH_OPENSSL@) SET(DCMTK_WITH_SNDFILE @DCMTK_WITH_SNDFILE@) SET(DCMTK_WITH_ICONV @DCMTK_WITH_ICONV@) +SET(DCMTK_WITH_STDLIBC_ICONV @DCMTK_WITH_STDLIBC_ICONV@) +SET(DCMTK_WITH_ICU @DCMTK_WITH_ICU@) +SET(DCMTK_WITH_WRAP @DCMTK_WITH_WRAP@) +SET(DCMTK_WITH_DOXYGEN @DCMTK_WITH_DOXYGEN@) + +# Dictionary-related +SET(DCMTK_ENABLE_BUILTIN_DICTIONARY @DCMTK_ENABLE_BUILTIN_DICTIONARY@) +SET(DCMTK_ENABLE_EXTERNAL_DICTIONARY @DCMTK_ENABLE_EXTERNAL_DICTIONARY@) SET(DCMTK_ENABLE_PRIVATE_TAGS @DCMTK_ENABLE_PRIVATE_TAGS@) -SET(DCMTK_WITH_THREADS @DCMTK_WITH_THREADS@) + +# Compiler / standard library features +SET(DCMTK_ENABLE_CXX11 @DCMTK_ENABLE_CXX11@) +SET(DCMTK_CXX11_FLAGS @DCMTK_CXX11_FLAGS@) +SET(DCMTK_ENABLE_STL @DCMTK_ENABLE_STL@) # DCMTK shared libraries SET(DCMTK_SHARED_LIBRARIES @BUILD_SHARED_LIBS@) SET(DCMTK_SINGLE_SHARED_LIBRARY @BUILD_SINGLE_SHARED_LIBRARY@) # DCMTK additional options +SET(DCMTK_WITH_THREADS @DCMTK_WITH_THREADS@) SET(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS @DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS@) SET(DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS @DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS@) SET(DCMTK_WIDE_CHAR_MAIN_FUNCTION @DCMTK_WIDE_CHAR_MAIN_FUNCTION@) +SET(DCMTK_ENABLE_LFS @DCMTK_ENABLE_LFS@) diff --git a/CMake/GenerateCMakeExports.cmake b/CMake/GenerateCMakeExports.cmake index 453ecc02..e231e587 100644 --- a/CMake/GenerateCMakeExports.cmake +++ b/CMake/GenerateCMakeExports.cmake @@ -16,14 +16,14 @@ # Get and store all executable targets to DCMTKTargets.cmake within build's main dir GET_PROPERTY(DCMTK_EXECUTABLE_TARGETS GLOBAL PROPERTY DCMTK_EXECUTABLE_TARGETS) -EXPORT(TARGETS ${DCMTK_EXECUTABLE_TARGETS} APPEND FILE ${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake) +EXPORT(TARGETS ${DCMTK_EXECUTABLE_TARGETS} APPEND FILE "${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake") # Get and store libraries to DCMTKTargets.cmake within the build's main dir GET_PROPERTY(DCMTK_LIBRARY_TARGETS GLOBAL PROPERTY DCMTK_LIBRARY_TARGETS) -EXPORT(TARGETS ${DCMTK_LIBRARY_TARGETS} APPEND FILE ${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake) +EXPORT(TARGETS ${DCMTK_LIBRARY_TARGETS} APPEND FILE "${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake") # Create DCMTConfigVersion.cmake with basic DCMTK version information (build tree) -SET(DCMTK_CONFIG_VERSION ${DCMTK_BUILD_CMKDIR}/DCMTKConfigVersion.cmake) +SET(DCMTK_CONFIG_VERSION "${DCMTK_BUILD_CMKDIR}/DCMTKConfigVersion.cmake") WRITE_BASIC_PACKAGE_VERSION_FILE( ${DCMTK_CONFIG_VERSION} VERSION ${DCMTK_MAJOR_VERSION}.${DCMTK_MINOR_VERSION}.${DCMTK_BUILD_VERSION} @@ -36,7 +36,7 @@ WRITE_BASIC_PACKAGE_VERSION_FILE( # build and install tree versions of the file. # Case 1: Configure 'DCMTKConfig.cmake' for a build tree. -SET(DCMTK_CMKDIR_CONFIG ${DCMTK_BUILD_CMKDIR}) +SET(DCMTK_CMKDIR_CONFIG "${DCMTK_BUILD_CMKDIR}") # Collect include paths SET(DCMTK_INCLUDE_DIR_CONFIGS "SET_AND_CHECK(DCMTK_config_INCLUDE_DIR \"${DCMTK_BINARY_DIR}/config/include/dcmtk/config\")") @@ -50,17 +50,17 @@ FOREACH(module ${DCMTK_MODULES}) SET(DCMTK_CONFIG_CODE "${DCMTK_CONFIG_CODE}list(APPEND DCMTK_INCLUDE_DIRS \"${DCMTK_SOURCE_DIR}/${module}/include\")\n") ENDFOREACH(module) SET(DCMTK_CONFIG_CODE "${DCMTK_CONFIG_CODE}##################################################") -SET(dcmtk_config ${DCMTK_BUILD_CMKDIR}/DCMTKConfig.cmake) +SET(dcmtk_config "${DCMTK_BUILD_CMKDIR}/DCMTKConfig.cmake") # Actually configure file and write it to build's main directory CONFIGURE_PACKAGE_CONFIG_FILE( CMake/DCMTKConfig.cmake.in ${dcmtk_config} - INSTALL_DESTINATION ${CMAKE_BINARY_DIR} + INSTALL_DESTINATION "${CMAKE_BINARY_DIR}" PATH_VARS DCMTK_CMKDIR_CONFIG DCMTK_INCLUDE_DIR_CONFIGS NO_CHECK_REQUIRED_COMPONENTS_MACRO) # Case 2: Configure 'DCMTKConfig.cmake' for an install tree -SET(DCMTK_CMKDIR_CONFIG ${DCMTK_INSTALL_CMKDIR}) +SET(DCMTK_CMKDIR_CONFIG "${DCMTK_INSTALL_CMKDIR}") # Collect include paths SET(DCMTK_INCLUDE_DIR_CONFIGS "SET_AND_CHECK(DCMTK_config_INCLUDE_DIR \"\${PACKAGE_PREFIX_DIR}/include/dcmtk/config\")") @@ -71,11 +71,11 @@ ENDFOREACH(module) SET(DCMTK_CONFIG_CODE "####### Expanded from \@DCMTK_CONFIG_CODE\@ #######\n") SET(DCMTK_CONFIG_CODE "${DCMTK_CONFIG_CODE}list(APPEND DCMTK_INCLUDE_DIRS \"\${PACKAGE_PREFIX_DIR}/include\")\n") SET(DCMTK_CONFIG_CODE "${DCMTK_CONFIG_CODE}##################################################") -SET(DCMTK_INSTALL_CONFIG ${CMAKE_BINARY_DIR}/CMakeFiles/DCMTKConfig.cmake) +SET(DCMTK_INSTALL_CONFIG "${CMAKE_BINARY_DIR}/CMakeFiles/DCMTKConfig.cmake") # Actually configure file and set rule to install it to installation subdir CONFIGURE_PACKAGE_CONFIG_FILE( CMake/DCMTKConfig.cmake.in - ${DCMTK_INSTALL_CONFIG} - INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/${DCMTK_INSTALL_CMKDIR} + "${DCMTK_INSTALL_CONFIG}" + INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX}/${DCMTK_INSTALL_CMKDIR}" PATH_VARS DCMTK_CMKDIR_CONFIG DCMTK_INCLUDE_DIR_CONFIGS NO_CHECK_REQUIRED_COMPONENTS_MACRO) diff --git a/CMake/GenerateDCMTKConfigure.cmake b/CMake/GenerateDCMTKConfigure.cmake old mode 100644 new mode 100755 index a31cc53d..19fb179a --- a/CMake/GenerateDCMTKConfigure.cmake +++ b/CMake/GenerateDCMTKConfigure.cmake @@ -1,3 +1,10 @@ +# Set build configuration to use for configuration tests +IF(CMAKE_BUILD_TYPE) + SET(CMAKE_TRY_COMPILE_CONFIGURATION "${CMAKE_BUILD_TYPE}") +ELSE(CMAKE_BUILD_TYPE) + SET(CMAKE_TRY_COMPILE_CONFIGURATION "Release") +ENDIF(CMAKE_BUILD_TYPE) + # Compiled-in dictionary support IF(DCMTK_ENABLE_BUILTIN_DICTIONARY) SET(ENABLE_BUILTIN_DICTIONARY 1) @@ -118,7 +125,7 @@ SET(CANONICAL_HOST_TYPE "${SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}") DCMTK_UNSET(SYSTEM_PROCESSOR) # Configure dictionary path and install prefix -IF(WIN32 AND NOT CYGWIN AND NOT MINGW) +IF(WIN32 AND NOT CYGWIN) # Set DCMTK_PREFIX needed within some code. Be sure that all / are replaced by \\. SET(DCMTK_PREFIX "${CMAKE_INSTALL_PREFIX}") STRING(REGEX REPLACE "/" "\\\\\\\\" DCMTK_PREFIX "${DCMTK_PREFIX}") @@ -140,26 +147,26 @@ IF(WIN32 AND NOT CYGWIN AND NOT MINGW) # Set default directory for configuration and support data. SET(DCMTK_DEFAULT_CONFIGURATION_DIR "") SET(DCMTK_DEFAULT_SUPPORT_DATA_DIR "") -ELSE(WIN32 AND NOT CYGWIN AND NOT MINGW) +ELSE(WIN32 AND NOT CYGWIN) # Set DCMTK_PREFIX needed within some code. SET(DCMTK_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set path and multiple path separator being used in dictionary code etc. SET(PATH_SEPARATOR "/") SET(ENVIRONMENT_PATH_SEPARATOR ":") # Set dictionary path to the data dir inside install main dir (prefix). - if (DCMTK_ENABLE_EXTERNAL_DICTIONARY) + IF(DCMTK_ENABLE_EXTERNAL_DICTIONARY) SET(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}/${DCMTK_INSTALL_DATDIR}/dicom.dic") # If private dictionary should be utilized, add it to default dictionary path. IF(ENABLE_PRIVATE_TAGS) SET(DCM_DICT_DEFAULT_PATH "${DCM_DICT_DEFAULT_PATH}:${DCMTK_PREFIX}/${DCMTK_INSTALL_DATDIR}/private.dic") ENDIF(ENABLE_PRIVATE_TAGS) - ELSE (DCMTK_ENABLE_EXTERNAL_DICTIONARY) + ELSE(DCMTK_ENABLE_EXTERNAL_DICTIONARY) SET(DCM_DICT_DEFAULT_PATH "") - ENDIF (DCMTK_ENABLE_EXTERNAL_DICTIONARY) + ENDIF(DCMTK_ENABLE_EXTERNAL_DICTIONARY) # Set default directory for configuration and support data. SET(DCMTK_DEFAULT_CONFIGURATION_DIR "${DCMTK_PREFIX}/${DCMTK_INSTALL_ETCDIR}/") SET(DCMTK_DEFAULT_SUPPORT_DATA_DIR "${DCMTK_PREFIX}/${DCMTK_INSTALL_DATDIR}/") -ENDIF(WIN32 AND NOT CYGWIN AND NOT MINGW) +ENDIF(WIN32 AND NOT CYGWIN) # Check the sizes of various types INCLUDE (CheckTypeSize) @@ -172,16 +179,59 @@ CHECK_TYPE_SIZE("short" SIZEOF_SHORT) CHECK_TYPE_SIZE("void*" SIZEOF_VOID_P) # Check for include files, libraries, and functions -INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake) -INCLUDE(${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake) -INCLUDE(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake) -INCLUDE(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) -INCLUDE(${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) -INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/CheckFunctionWithHeaderExists.cmake) +INCLUDE("${DCMTK_CMAKE_INCLUDE}CMake/dcmtkTryCompile.cmake") +INCLUDE("${DCMTK_CMAKE_INCLUDE}CMake/dcmtkTryRun.cmake") +INCLUDE("${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake") +INCLUDE("${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake") +INCLUDE("${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake") +INCLUDE("${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake") +INCLUDE("${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake") +INCLUDE("${DCMTK_CMAKE_INCLUDE}CMake/CheckFunctionWithHeaderExists.cmake") +INCLUDE(CheckCXXSymbolExists OPTIONAL) +IF(NOT COMMAND CHECK_CXX_SYMBOL_EXISTS) + # fallback implementation for old CMake Versions + FUNCTION(CHECK_CXX_SYMBOL_EXISTS SYMBOL FILES VAR) + SET(CODE) + FOREACH(FILE ${FILES}) + SET(CODE "${CODE}#include <${FILE}>\n") + ENDFOREACH() + SET(CODE "${CODE}\nint main(int argc, char** argv)\n{\n (void)argv;\n#ifndef ${SYMBOL}\n return ((int*)(&${SYMBOL}))[argc];\n#else\n (void)argc;\n return 0;\n#endif\n}\n") + DCMTK_TRY_COMPILE("${VAR}" "the compiler supports ${SYMBOL}" "${CODE}") + ENDFUNCTION() +ENDIF(NOT COMMAND CHECK_CXX_SYMBOL_EXISTS) + +FOREACH(FUNC "__FUNCTION__" "__PRETTY_FUNCTION__" "__func__") + CHECK_SYMBOL_EXISTS("${FUNC}" "" "HAVE_${FUNC}_C_MACRO") + # test if the C++ compiler also supports them (e.g. SunPro doesn't) + CHECK_CXX_SYMBOL_EXISTS("${FUNC}" "" "HAVE_${FUNC}_CXX_MACRO") + IF(HAVE_${FUNC}_C_MACRO AND HAVE_${FUNC}_CXX_MACRO) + SET("HAVE_${FUNC}_MACRO" 1 CACHE INTERNAL "Have symbol ${FUNC}" FORCE) + ELSE() + SET("HAVE_${FUNC}_MACRO" CACHE INTERNAL "Have symbol ${FUNC}" FORCE) + ENDIF() +ENDFOREACH() -CHECK_SYMBOL_EXISTS(__FUNCTION__ "" HAVE___FUNCTION___MACRO) -CHECK_SYMBOL_EXISTS(__PRETTY_FUNCTION__ "" HAVE___PRETTY_FUNCTION___MACRO) -CHECK_SYMBOL_EXISTS(__func__ "" HAVE___func___MACRO) +# prepare include directories for 3rdparty libraries before performing +# header searches +IF(ZLIB_INCDIR) + LIST(APPEND CMAKE_REQUIRED_INCLUDES "${ZLIB_INCDIR}") +ENDIF(ZLIB_INCDIR) + +IF(ZLIB_INCLUDE_DIRS) + LIST(APPEND CMAKE_REQUIRED_INCLUDES "${ZLIB_INCLUDE_DIRS}") +ENDIF(ZLIB_INCLUDE_DIRS) + +IF(LIBPNG_INCDIR) + LIST(APPEND CMAKE_REQUIRED_INCLUDES "${LIBPNG_INCDIR}") +ENDIF(LIBPNG_INCDIR) + +IF(PNG_INCLUDE_DIR) + LIST(APPEND CMAKE_REQUIRED_INCLUDES "${PNG_INCLUDE_DIR}") +ENDIF(PNG_INCLUDE_DIR) + +IF(OPENSSL_INCDIR) + LIST(APPEND CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCDIR}") +ENDIF(OPENSSL_INCDIR) # For Windows, hardcode these values to avoid long search times IF(WIN32 AND NOT CYGWIN) @@ -208,7 +258,7 @@ ENDIF(WIN32 AND NOT CYGWIN) CHECK_INCLUDE_FILE_CXX("iostream.h" HAVE_IOSTREAM_H) CHECK_INCLUDE_FILE_CXX("io.h" HAVE_IO_H) CHECK_INCLUDE_FILE_CXX("iso646.h" HAVE_ISO646_H) - CHECK_INCLUDE_FILE_CXX("png.h" HAVE_LIBPNG_PNG_H) + CHECK_INCLUDE_FILE_CXX("png.h" HAVE_PNG_H) CHECK_INCLUDE_FILE_CXX("limits.h" HAVE_LIMITS_H) CHECK_INCLUDE_FILE_CXX("climits" HAVE_CLIMITS) CHECK_INCLUDE_FILE_CXX("locale.h" HAVE_LOCALE_H) @@ -288,6 +338,14 @@ ENDIF(WIN32 AND NOT CYGWIN) ENDIF(HAVE_NETINET_IN_H) CHECK_INCLUDE_FILES("${TCP_H_DEPS};netinet/tcp.h" HAVE_NETINET_TCP_H) + IF(NOT HAVE_PNG_H) + # is unavailable, so test if we need to include it as + CHECK_INCLUDE_FILE_CXX("libpng/png.h" HAVE_LIBPNG_PNG_H) + ELSE(NOT HAVE_PNG_H) + # ensure including is preferred + DCMTK_UNSET_CACHE(HAVE_LIBPNG_PNG_H) + ENDIF(NOT HAVE_PNG_H) + # There is no CMake macro to take care of these yet IF(WIN32 AND NOT CYGWIN AND NOT MINGW) @@ -322,11 +380,10 @@ ENDIF(WIN32 AND NOT CYGWIN) CHECK_FUNCTION_EXISTS(gethostbyname HAVE_GETHOSTBYNAME) CHECK_FUNCTION_EXISTS(gethostbyname_r HAVE_GETHOSTBYNAME_R) CHECK_FUNCTION_EXISTS(gethostbyaddr_r HAVE_GETHOSTBYADDR_R) - CHECK_FUNCTION_EXISTS(getgrnam_r HAVE_GETGRNAM_R) - CHECK_FUNCTION_EXISTS(getpwnam_r HAVE_GETPWNAM_R) CHECK_FUNCTION_EXISTS(gethostname HAVE_GETHOSTNAME) CHECK_FUNCTION_EXISTS(gethostid HAVE_GETHOSTID) CHECK_FUNCTION_EXISTS(getlogin HAVE_GETLOGIN) + CHECK_FUNCTION_EXISTS(getlogin_r HAVE_GETLOGIN_R) CHECK_FUNCTION_EXISTS(getpid HAVE_GETPID) CHECK_FUNCTION_EXISTS(getpwnam HAVE_GETPWNAM) CHECK_FUNCTION_EXISTS(getsockname HAVE_GETSOCKNAME) @@ -344,10 +401,7 @@ ENDIF(WIN32 AND NOT CYGWIN) CHECK_FUNCTION_EXISTS(malloc_debug HAVE_MALLOC_DEBUG) CHECK_FUNCTION_EXISTS(mbstowcs HAVE_MBSTOWCS) CHECK_FUNCTION_EXISTS(wcstombs HAVE_WCSTOMBS) - CHECK_FUNCTION_EXISTS(memcmp HAVE_MEMCMP) - CHECK_FUNCTION_EXISTS(memcpy HAVE_MEMCPY) CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE) - CHECK_FUNCTION_EXISTS(memset HAVE_MEMSET) CHECK_FUNCTION_EXISTS(mkstemp HAVE_MKSTEMP) CHECK_FUNCTION_EXISTS(mktemp HAVE_MKTEMP) CHECK_FUNCTION_EXISTS(rindex HAVE_RINDEX) @@ -468,19 +522,31 @@ ENDIF(WIN32 AND NOT CYGWIN) SET(HEADERS ${HEADERS} windows.h) ENDIF(HAVE_WINDOWS_H) + IF(HAVE_GRP_H) + SET(HEADERS ${HEADERS} grp.h) + ENDIF(HAVE_GRP_H) + IF(HAVE_PWD_H) SET(HEADERS ${HEADERS} pwd.h) ENDIF(HAVE_PWD_H) + IF(HAVE_DIRENT_H) + SET(HEADERS ${HEADERS} dirent.h) + ENDIF(HAVE_DIRENT_H) + IF(HAVE_SYS_SYSCALL_H) SET(HEADERS ${HEADERS} sys/syscall.h) ENDIF(HAVE_SYS_SYSCALL_H) IF(HAVE_WINSOCK_H) SET(HEADERS ${HEADERS} winsock.h) - SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ws2_32 netapi32 wsock32) + SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} iphlpapi ws2_32 netapi32 wsock32) ENDIF(HAVE_WINSOCK_H) + IF(HAVE_FENV_H) + SET(HEADERS ${HEADERS} fenv.h) + ENDIF(HAVE_FENV_H) + # std::vsnprintf and std::vsnprintf need the C++ version of the headers. # We just assume they exist when the C version was found SET(CXXHEADERS) @@ -501,6 +567,7 @@ ENDIF(WIN32 AND NOT CYGWIN) SET(CXXHEADERS ${CXXHEADERS} cstddef) ENDIF(HAVE_CSTDDEF) + CHECK_FUNCTIONWITHHEADER_EXISTS(feenableexcept "${HEADERS}" HAVE_PROTOTYPE_FEENABLEEXCEPT) CHECK_FUNCTIONWITHHEADER_EXISTS(isinf "${HEADERS}" HAVE_PROTOTYPE_ISINF) CHECK_FUNCTIONWITHHEADER_EXISTS(isnan "${HEADERS}" HAVE_PROTOTYPE_ISNAN) CHECK_FUNCTIONWITHHEADER_EXISTS(finite "${HEADERS}" HAVE_PROTOTYPE_FINITE) @@ -510,6 +577,7 @@ ENDIF(WIN32 AND NOT CYGWIN) CHECK_FUNCTIONWITHHEADER_EXISTS(flock "${HEADERS}" HAVE_PROTOTYPE_FLOCK) CHECK_FUNCTIONWITHHEADER_EXISTS(gethostbyname "${HEADERS}" HAVE_PROTOTYPE_GETHOSTBYNAME) CHECK_FUNCTIONWITHHEADER_EXISTS(gethostbyname_r "${HEADERS}" HAVE_PROTOTYPE_GETHOSTBYNAME_R) + CHECK_FUNCTIONWITHHEADER_EXISTS(gethostbyaddr_r "${HEADERS}" HAVE_PROTOTYPE_GETHOSTBYADDR_R) CHECK_FUNCTIONWITHHEADER_EXISTS(gethostid "${HEADERS}" HAVE_PROTOTYPE_GETHOSTID) CHECK_FUNCTIONWITHHEADER_EXISTS(bzero "${HEADERS}" HAVE_PROTOTYPE_BZERO) CHECK_FUNCTIONWITHHEADER_EXISTS(gethostname "${HEADERS}" HAVE_PROTOTYPE_GETHOSTNAME) @@ -538,6 +606,9 @@ ENDIF(WIN32 AND NOT CYGWIN) CHECK_FUNCTIONWITHHEADER_EXISTS(connect "${HEADERS}" HAVE_PROTOTYPE_CONNECT) CHECK_FUNCTIONWITHHEADER_EXISTS(mkstemp "${HEADERS}" HAVE_PROTOTYPE_MKSTEMP) CHECK_FUNCTIONWITHHEADER_EXISTS(mktemp "${HEADERS}" HAVE_PROTOTYPE_MKTEMP) + CHECK_FUNCTIONWITHHEADER_EXISTS(memcmp "${HEADERS}" HAVE_MEMCMP) + CHECK_FUNCTIONWITHHEADER_EXISTS(memcpy "${HEADERS}" HAVE_MEMCPY) + CHECK_FUNCTIONWITHHEADER_EXISTS(memset "${HEADERS}" HAVE_MEMSET) CHECK_FUNCTIONWITHHEADER_EXISTS(select "${HEADERS}" HAVE_PROTOTYPE_SELECT) CHECK_FUNCTIONWITHHEADER_EXISTS(strcasecmp "${HEADERS}" HAVE_PROTOTYPE_STRCASECMP) CHECK_FUNCTIONWITHHEADER_EXISTS(strncasecmp "${HEADERS}" HAVE_PROTOTYPE_STRNCASECMP) @@ -551,13 +622,14 @@ ENDIF(WIN32 AND NOT CYGWIN) CHECK_FUNCTIONWITHHEADER_EXISTS("InterlockedIncrement((long*)0)" "${HEADERS}" HAVE_INTERLOCKED_INCREMENT) CHECK_FUNCTIONWITHHEADER_EXISTS("InterlockedDecrement((long*)0)" "${HEADERS}" HAVE_INTERLOCKED_DECREMENT) CHECK_FUNCTIONWITHHEADER_EXISTS("_fpclassf(0.0f)" "${HEADERS}" HAVE_PROTOTYPE__FPCLASSF) + CHECK_FUNCTIONWITHHEADER_EXISTS("getgrnam_r((char*)0,(group*)0,(char*)0,0,(group**)0)" "${HEADERS}" HAVE_GETGRNAM_R) + CHECK_FUNCTIONWITHHEADER_EXISTS("getpwnam_r((char*)0,(passwd*)0,(char*)0,0,(passwd**)0)" "${HEADERS}" HAVE_GETPWNAM_R) + CHECK_FUNCTIONWITHHEADER_EXISTS("readdir_r((DIR*)0,(dirent*)0,(dirent**)0)" "${HEADERS}" HAVE_READDIR_R) CHECK_FUNCTIONWITHHEADER_EXISTS(nanosleep "${HEADERS}" HAVE_PROTOTYPE_NANOSLEEP) CHECK_FUNCTIONWITHHEADER_EXISTS("&passwd::pw_gecos" "${HEADERS}" HAVE_PASSWD_GECOS) # TODO: Uncommented because it seems not to make sense. Remove if there are no complaints. #CHECK_LIBRARY_EXISTS(iostream "" "" HAVE_LIBIOSTREAM) - #CHECK_LIBRARY_EXISTS(nsl "" "" HAVE_LIBNSL) - #CHECK_LIBRARY_EXISTS(socket "" "" HAVE_LIBSOCKET) # Check for some type definitions needed by JasPer and defines them if necessary # Even if not functions but types are looked for, the script works fine. @@ -570,6 +642,8 @@ ENDIF(WIN32 AND NOT CYGWIN) CHECK_FUNCTIONWITHHEADER_EXISTS("ulonglong definition" "${HEADERS}" HAVE_ULONGLONG) CHECK_FUNCTIONWITHHEADER_EXISTS("long long definition" "${HEADERS}" HAVE_LONG_LONG) CHECK_FUNCTIONWITHHEADER_EXISTS("unsigned long long definition" "${HEADERS}" HAVE_UNSIGNED_LONG_LONG) + CHECK_FUNCTIONWITHHEADER_EXISTS("int64_t definition" "${HEADERS}" HAVE_INT64_T) + CHECK_FUNCTIONWITHHEADER_EXISTS("uint64_t definition" "${HEADERS}" HAVE_UINT64_T) # File access stuff CHECK_FUNCTIONWITHHEADER_EXISTS("fpos64_t definition" "${HEADERS}" HAVE_FPOS64_T) @@ -588,14 +662,61 @@ IF(DCMTK_WITH_OPENSSL) CHECK_FUNCTIONWITHHEADER_EXISTS("RAND_egd" "openssl/rand.h" HAVE_RAND_EGD ${OPENSSL_LIBS}) ENDIF(DCMTK_WITH_OPENSSL) +IF(HAVE_LOCKF AND ANDROID) + # When Android introduced lockf, they forgot to put the constants like F_LOCK in the + # appropriate headers, this tests if they are defined and disables lockf if they are not + CHECK_FUNCTIONWITHHEADER_EXISTS("lockf(0, F_LOCK, 0)" "${HEADERS}" HAVE_LOCKF_CONSTANTS) + IF(NOT HAVE_LOCKF_CONSTANTS) + SET(HAVE_LOCKF FALSE CACHE INTERNAL "lockf implementation is broken") + ENDIF() +ENDIF(HAVE_LOCKF AND ANDROID) + # Tests that require a try-compile -INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkTryCompile.cmake) -INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkTryRun.cmake) + +IF(HAVE_MATH_H) + IF(HAVE_LIBC_H) + # checks if and cause a problem if libc.h is included extern "C" + # and math.h is not. This is the case on QNX 6.2.x and 6.5.x. + DCMTK_TRY_COMPILE(INCLUDE_LIBC_H_AS_EXTERN_C " can be included as extern \"C\"" + "extern \"C\" { +#include +} +#include +int main() +{ + int i = 0; + return 0; +}") + IF(INCLUDE_LIBC_H_AS_EXTERN_C) + SET(INCLUDE_LIBC_H_AS_CXX 0 CACHE INTERNAL "libc.h should be treated as a C++ header") + ELSE() + SET(INCLUDE_LIBC_H_AS_CXX 1 CACHE INTERNAL "libc.h should be treated as a C++ header") + ENDIF() + ENDIF(HAVE_LIBC_H) + + # checks if must be included as a C++ include file (i.e. without extern "C"). + # Some sytems (Win32, HP/UX 10) use C++ language features in . + DCMTK_TRY_COMPILE(INCLUDE_MATH_H_AS_EXTERN_C " can be included as extern \"C\"" + "extern \"C\" { +#include +} +int main() +{ + int i = 0; + return 0; +}") + IF(INCLUDE_MATH_H_AS_EXTERN_C) + SET(INCLUDE_MATH_H_AS_CXX 0 CACHE INTERNAL "math.h should be treated as a C++ header") + ELSE() + SET(INCLUDE_MATH_H_AS_CXX 1 CACHE INTERNAL "math.h should be treated as a C++ header") + ENDIF() +ENDIF(HAVE_MATH_H) + IF(NOT DEFINED C_CHAR_UNSIGNED) MESSAGE(STATUS "Checking signedness of char") - DCMTK_TRY_RUN(C_CHAR_SIGNED C_CHAR_SIGNED_COMPILED ${CMAKE_BINARY_DIR}/CMakeTmp/Char - ${DCMTK_SOURCE_DIR}/CMake/dcmtkTestCharSignedness.cc + DCMTK_TRY_RUN(C_CHAR_SIGNED C_CHAR_SIGNED_COMPILED "${CMAKE_BINARY_DIR}/CMakeTmp/Char" + "${DCMTK_SOURCE_DIR}/CMake/dcmtkTestCharSignedness.cc" COMPILE_OUTPUT_VARIABLE C_CHAR_SIGNED_COMPILE_OUTPUT) IF(C_CHAR_SIGNED_COMPILED) IF(C_CHAR_SIGNED) @@ -622,10 +743,10 @@ int main() }") # Check for thread type -IF (HAVE_WINDOWS_H) - SET(HAVE_INT_TYPE_PTHREAD_T 1) -ELSE (HAVE_WINDOWS_H) - DCMTK_TRY_COMPILE(HAVE_INT_TYPE_PTHREAD_T "pthread_t is an integer type" +IF(HAVE_WINDOWS_H) + SET(HAVE_INT_TYPE_PTHREAD_T 1) +ELSE(HAVE_WINDOWS_H) + DCMTK_TRY_COMPILE(HAVE_INT_TYPE_PTHREAD_T "pthread_t is an integer type" "// test to see if pthread_t is a pointer type or not #include @@ -636,11 +757,11 @@ int main () unsigned long l = p; return 0; }") - IF (NOT HAVE_INT_TYPE_PTHREAD_T) - SET(HAVE_POINTER_TYPE_PTHREAD_T 1 CACHE INTERNAL "Set if pthread_t is a pointer type") - ELSE (NOT HAVE_INT_TYPE_PTHREAD_T) - SET(HAVE_POINTER_TYPE_PTHREAD_T 0 CACHE INTERNAL "Set if pthread_t is a pointer type") - ENDIF (NOT HAVE_INT_TYPE_PTHREAD_T) + IF(NOT HAVE_INT_TYPE_PTHREAD_T) + SET(HAVE_POINTER_TYPE_PTHREAD_T 1 CACHE INTERNAL "Set if pthread_t is a pointer type") + ELSE(NOT HAVE_INT_TYPE_PTHREAD_T) + SET(HAVE_POINTER_TYPE_PTHREAD_T 0 CACHE INTERNAL "Set if pthread_t is a pointer type") + ENDIF(NOT HAVE_INT_TYPE_PTHREAD_T) ENDIF(HAVE_WINDOWS_H) # Check if typename works properly. Only MSC6 really fails here. @@ -717,18 +838,228 @@ int main() return 0; }") -# Check for explicit large file support -DCMTK_TRY_COMPILE(_LARGEFILE64_SOURCE "explicit large file support is available" - "#define _LARGEFILE64_SOURCE -#include - -using namespace std; +# do try compile to detect lfs and flags +FUNCTION(DCMTK_LFS_TRY_COMPILE VAR FILE FLAGS DEFINITIONS) + IF(FLAGS OR DEFINITIONS) + SET(OPTIONS " with arguments: \"") + ELSE() + SET(OPTIONS) + ENDIF() + IF(DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS OR FLAGS) + SET(CMAKE_FLAGS CMAKE_FLAGS ${DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS}) + IF(FLAGS) + LIST(APPEND CMAKE_FLAGS "-DCMAKE_C_FLAGS:STRING=${FLAGS}") + SET(OPTIONS "${OPTIONS}${FLAGS}") + ENDIF() + ELSE() + SET(CMAKE_FLAGS) + ENDIF() + IF(DEFINITIONS) + SET(COMPILE_DEFINITIONS COMPILE_DEFINITIONS ${DEFINITIONS}) + IF(FLAGS) + SET(OPTIONS "${OPTIONS} ") + ENDIF() + SET(OPTIONS "${OPTIONS}${DEFINITIONS}") + ELSE() + SET(COMPILE_DEFINITIONS) + ENDIF() + IF(FLAGS OR DEFINITIONS) + SET(OPTIONS "${OPTIONS}\"") + ENDIF() + SET(SOURCEFILE "${DCMTK_SOURCE_DIR}/config/tests/${FILE}") + TRY_COMPILE(RESULT + "${CMAKE_BINARY_DIR}" + "${SOURCEFILE}" + ${CMAKE_FLAGS} + ${COMPILE_DEFINITIONS} + OUTPUT_VARIABLE OUTPUT + ) + SET("${VAR}" "${RESULT}" PARENT_SCOPE) + IF(RESULT) + SET(LOGFILE "CMakeOutput.log") + SET(LOG "succeded") + ELSE() + SET(LOGFILE "CMakeError.log") + SET(LOG "failed") + ENDIF() + FILE(TO_NATIVE_PATH "${SOURCEFILE}" SOURCEFILE) + FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${LOGFILE}" + "compiling \"${SOURCEFILE}\"${OPTIONS} ${LOG} with the following output:\n" + "${OUTPUT}\n" + ) +ENDFUNCTION(DCMTK_LFS_TRY_COMPILE) + +FUNCTION(DCMTK_CHECK_ENABLE_LFS) + # normalize arguments + IF(DCMTK_ENABLE_LFS) + # for cases insensitive comparison + STRING(TOLOWER "${DCMTK_ENABLE_LFS}" DCMTK_ENABLE_LFS) + ENDIF() + IF(NOT DCMTK_ENABLE_LFS OR DCMTK_ENABLE_LFS MATCHES "^(on|true|yes|1)$") + SET(DCMTK_ENABLE_LFS "auto") + ELSEIF(DCMTK_ENABLE_LFS MATCHES "^(no|false|0)$") + SET(DCMTK_ENABLE_LFS "off") + ENDIF() + # determin whether lfs64 is available in case it wasn't detected yet it may be used + IF(NOT DEFINED DCMTK_LFS64_AVAILABLE AND DCMTK_ENABLE_LFS MATCHES "^(lfs64|auto)$") + SET(DCMTK_LFS64_DEFINITIONS) + SET(MESSAGE_RESULT "no") + SET(MESSAGE "Checking whether explicit large file support (LFS64) is available") + MESSAGE(STATUS "${MESSAGE}") + DCMTK_LFS_TRY_COMPILE(RESULT "lfs64.cc" "" "") + IF(NOT RESULT) + DCMTK_LFS_TRY_COMPILE(RESULT "lfs64.cc" "" "-D_LARGEFILE64_SOURCE") + IF(RESULT) + SET(DCMTK_LFS64_DEFINITIONS "-D_LARGEFILE64_SOURCE") + SET(MESSAGE_RESULT "yes, with ${DCMTK_LFS64_DEFINITIONS}") + ENDIF() + ELSE() + SET(MESSAGE_RESULT "yes") + ENDIF() + IF(RESULT) + SET(DCMTK_ENABLE_LFS "lfs64") + SET(DCMTK_LFS64_DEFINITIONS "${DCMTK_LFS64_DEFINITIONS}" CACHE INTERNAL "which compiler definitions to set for enabling LFS64 support") + ENDIF() + SET(DCMTK_LFS64_AVAILABLE "${RESULT}" CACHE INTERNAL "whether LFS64 is available or not" FORCE) + MESSAGE(STATUS "${MESSAGE} -- ${MESSAGE_RESULT}") + ENDIF() + # determin whether lfs is available in case it wasn't detected yet it may be used + IF(NOT DEFINED DCMTK_LFS_AVAILABLE AND DCMTK_ENABLE_LFS MATCHES "^(lfs|auto)$") + SET(DCMTK_LFS_FLAGS) + SET(DCMTK_LFS_DEFINITIONS) + SET(MESSAGE_RESULT "no") + SET(MESSAGE "Checking whether large file support (LFS) is available") + MESSAGE(STATUS "${MESSAGE}") + # determine size of fpos_t (for the strange LFS implementation on Windows) + SET(CMAKE_EXTRA_INCLUDE_FILES) + IF(HAVE_STDIO_H) + # prefer stdio.h so that is not in namespace std + SET(CMAKE_EXTRA_INCLUDE_FILES "stdio.h") + ELSEIF(HAVE_CSTDIO) + # use cstdio as the fallback + SET(CMAKE_EXTRA_INCLUDE_FILES "cstdio") + ENDIF() + CHECK_TYPE_SIZE("fpos_t" SIZEOF_FPOS_T) + # assume sizeof off_t to be correct, will be removed if below tests fail + SET(SIZEOF_OFF_T 8) + # try compile different combinations of compiler flags and definitions + DCMTK_LFS_TRY_COMPILE(RESULT "lfs.c" "" "") + IF(NOT RESULT) + SET(DCMTK_LFS_FLAGS "-n32") + DCMTK_LFS_TRY_COMPILE(RESULT "lfs.c" "-n32" "") + ENDIF() + IF(NOT RESULT) + SET(DCMTK_LFS_FLAGS "") + SET(DCMTK_LFS_DEFINITIONS "-D_FILE_OFFSET_BITS=64") + DCMTK_LFS_TRY_COMPILE(RESULT "lfs.c" "" "-D_FILE_OFFSET_BITS=64") + ENDIF() + IF(NOT RESULT) + SET(DCMTK_LFS_FLAGS "-n32") + SET(DCMTK_LFS_DEFINITIONS "-D_FILE_OFFSET_BITS=64") + DCMTK_LFS_TRY_COMPILE(RESULT "lfs.c" "-n32" "-D_FILE_OFFSET_BITS=64") + ENDIF() + IF(NOT RESULT) + SET(DCMTK_LFS_FLAGS "") + SET(DCMTK_LFS_DEFINITIONS "-D_LARGE_FILES=1") + DCMTK_LFS_TRY_COMPILE(RESULT "lfs.c" "" "-D_LARGE_FILES=1") + ENDIF() + IF(NOT RESULT) + SET(DCMTK_LFS_FLAGS "-n32") + SET(DCMTK_LFS_DEFINITIONS "-D_LARGE_FILES=1") + DCMTK_LFS_TRY_COMPILE(RESULT "lfs.c" "-n32" "-D_LARGE_FILES=1") + ENDIF() + IF(NOT RESULT) + # remove flags and reset SIZEOF_OFF_T to indeterminate + SET(DCMTK_LFS_FLAGS) + SET(DCMTK_LFS_DEFINITIONS) + SET(SIZEOF_OFF_T) + # detect strange LFS implementation that (at least) Windows provides + # strange since sizeof(fpos_t) == 8 but sizeof(off_t) == 4! + IF(SIZEOF_FPOS_T EQUAL 8) + SET(RESULT TRUE) + ENDIF() + ENDIF() + # format a nice result message + IF(RESULT) + SET(DCMTK_ENABLE_LFS "lfs") + SET(DCMTK_LFS_FLAGS "${DCMTK_LFS_FLAGS}" CACHE INTERNAL "which compiler flags to set for enabling LFS support") + SET(DCMTK_LFS_DEFINITIONS "${DCMTK_LFS_DEFINITIONS}" CACHE INTERNAL "which compiler definitions to set for enabling LFS support") + SET(MESSAGE_RESULT "yes") + IF(NOT DCMTK_LFS_FLAGS STREQUAL "" OR NOT DCMTK_LFS_DEFINITIONS STREQUAL "") + SET(MESSAGE_RESULT "${MESSAGE_RESULT}, with") + IF(NOT DCMTK_LFS_FLAGS STREQUAL "") + SET(MESSAGE_RESULT "${MESSAGE_RESULT} ${DCMTK_LFS_FLAGS}") + ENDIF() + IF(NOT DCMTK_LFS_DEFINITIONS STREQUAL "") + SET(MESSAGE_RESULT "${MESSAGE_RESULT} ${DCMTK_LFS_DEFINITIONS}") + ENDIF() + ENDIF() + ENDIF() + SET(DCMTK_LFS_AVAILABLE "${RESULT}" CACHE INTERNAL "whether LFS is available or not" FORCE) + IF(DEFINED SIZEOF_OFF_T) + SET(SIZEOF_OFF_T "${SIZEOF_OFF_T}" CACHE INTERNAL "") + ENDIF() + MESSAGE(STATUS "${MESSAGE} -- ${MESSAGE_RESULT}") + ENDIF() + # auto-select LFS implementation in case this is not the first run and the above tests did not select it + IF(DCMTK_ENABLE_LFS STREQUAL "auto") + IF(DCMTK_LFS64_AVAILABLE) + SET(DCMTK_ENABLE_LFS "lfs64") + ELSEIF(DCMTK_LFS_AVAILABLE) + SET(DCMTK_ENABLE_LFS "lfs") + ELSE() + SET(DCMTK_ENABLE_LFS "off") + ENDIF() + ELSEIF(NOT DCMTK_ENABLE_LFS MATCHES "^(lfs|lfs64|off)$") + # print a warning in case the given argument was not understood + MESSAGE(WARNING "unknown argument \"${DCMTK_ENABLE_LFS}\" for DCMTK_ENABLE_LFS, setting it to \"off\"") + SET(DCMTK_ENABLE_LFS "off") + ELSEIF(DCMTK_ENABLE_LFS STREQUAL "lfs64" AND NOT DCMTK_LFS64_AVAILABLE) + # test if the explicitly chosen implementation is really available + MESSAGE(WARNING "LFS64 was enabled but LFS64 support is not available, focing DCMTK_ENABLE_LFS to \"off\"") + SET(DCMTK_ENABLE_LFS "off") + ELSEIF(DCMTK_ENABLE_LFS STREQUAL "lfs" AND NOT DCMTK_LFS_AVAILABLE) + # test if the explicitly chosen implementation is really available + MESSAGE(WARNING "LFS was enabled but LFS support is not available, focing DCMTK_ENABLE_LFS to \"off\"") + SET(DCMTK_ENABLE_LFS "off") + ENDIF() + # create a list of available LFS types for the CMake GUI + SET(AVAILABLE_LFS_TYPES) + IF(NOT DEFINED DCMTK_LFS64_AVAILABLE OR DCMTK_LFS64_AVAILABLE) + LIST(APPEND AVAILABLE_LFS_TYPES "lfs64") + ENDIF() + IF(NOT DEFINED DCMTK_LFS_AVAILABLE OR DCMTK_LFS_AVAILABLE) + LIST(APPEND AVAILABLE_LFS_TYPES "lfs") + ENDIF() + # store the chosen value to the cache (potentially normalizing the given argument) + SET(DCMTK_ENABLE_LFS "${DCMTK_ENABLE_LFS}" CACHE STRING "whether to use lfs/lfs64 or not" FORCE) + SET_PROPERTY(CACHE DCMTK_ENABLE_LFS PROPERTY STRINGS "auto" ${AVAILABLE_LFS_TYPES} "off") + # set values for osconfig.h and add compiler flags and definitions (if necessary) + IF(DCMTK_ENABLE_LFS STREQUAL "lfs64") + # set the value for generating osconfig.h + SET(DCMTK_LFS_MODE "DCMTK_LFS64" CACHE INTERNAL "" FORCE) + IF(NOT DCMTK_LFS64_DEFINITIONS STREQUAL "") + ADD_DEFINITIONS(${DCMTK_LFS64_DEFINITIONS}) + ENDIF() + MESSAGE(STATUS "Info: Building DCMTK with explicit large file support (LFS64)") + ELSEIF(DCMTK_ENABLE_LFS STREQUAL "lfs") + # set the value for generating osconfig.h + SET(DCMTK_LFS_MODE "DCMTK_LFS" CACHE INTERNAL "" FORCE) + IF(NOT DCMTK_LFS_FLAGS STREQUAL "") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DCMTK_LFS_FLAGS}") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DCMTK_LFS_FLAGS}") + ENDIF() + IF(NOT DCMTK_LFS_DEFINITIONS STREQUAL "") + ADD_DEFINITIONS(${DCMTK_LFS_DEFINITIONS}) + ENDIF() + MESSAGE(STATUS "Info: Building DCMTK with large file support (LFS)") + ELSE() + SET(DCMTK_ENABLE_LFS) + MESSAGE(STATUS "Info: Building DCMTK without large file support, files >4GB may be inaccesible!") + ENDIF() +ENDFUNCTION(DCMTK_CHECK_ENABLE_LFS) -int main() -{ - FILE *f = fopen64(\"name\", \"r\"); - return 0; -}") +DCMTK_CHECK_ENABLE_LFS() IF(WIN32) # If someone can tell me how to convince TRY_COMPILE to link against winsock, @@ -832,13 +1163,6 @@ int main() return 0; }") -DCMTK_TRY_COMPILE(ALIGNAS_SUPPORTS_TYPEDEFS "alignas supports typedefs" - "int main() -{ - typedef char type[16] alignas(4); - return 0; -}") - DCMTK_TRY_COMPILE(HAVE_DECLSPEC_ALIGN "__declspec(align) is supported" "int main() { @@ -856,39 +1180,69 @@ static yes_type sfinae(consume*); template static no_type sfinae(...); struct test { test( int ); }; +template +struct enable {}; +template<> +struct enable<0> { enum { result = 0 }; }; int main() { - return sizeof(sfinae(0)) == sizeof(yes_type); + return enable(0)) == sizeof(yes_type)>::result; }") -# Compile config/arith.cc and generate config/arith.h +DCMTK_TRY_COMPILE(HAVE_STD_NAMESPACE "ANSI standard C++ includes use std namespace" + "#include +int main() +{ + using namespace std; + std::cout << endl; + return 0; +}") + +DCMTK_TRY_COMPILE(HAVE_STD__NOTHROW "the compiler supports std::nothrow" + "#include +int main() +{ + int* i = new (std::nothrow) int; + return 0; +}") + +DCMTK_TRY_COMPILE(HAVE_NOTHROW_DELETE "the compiler supports operator delete (std::nothrow)" + "#include +int main() +{ + int* i = 0; + operator delete (i,std::nothrow); + return 0; +}") + +# Compile config/tests/arith.cc and generate config/arith.h FUNCTION(INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES) - SET(ARITH_H_FILE ${DCMTK_BINARY_DIR}/config/include/dcmtk/config/arith.h) - IF(NOT EXISTS "${ARITH_H_FILE}") + SET(ARITH_H_FILE "${DCMTK_BINARY_DIR}/config/include/dcmtk/config/arith.h") + IF("${DCMTK_SOURCE_DIR}/config/tests/arith.cc" IS_NEWER_THAN "${ARITH_H_FILE}") IF(CMAKE_CROSSCOMPILING) IF(WIN32) - UNIX_TO_WINE_PATH(ARITH_H_FILE ${ARITH_H_FILE}) - STRING(REPLACE "\\" "\\\\" ARITH_H_FILE ${ARITH_H_FILE}) + UNIX_TO_WINE_PATH(ARITH_H_FILE "${ARITH_H_FILE}") + STRING(REPLACE "\\" "\\\\" ARITH_H_FILE "${ARITH_H_FILE}") ELSEIF(ANDROID) - SET(ARITH_H_DESTINATION ${ARITH_H_FILE}) + SET(ARITH_H_DESTINATION "${ARITH_H_FILE}") SET(ARITH_H_FILE "${ANDROID_TEMPORARY_FILES_LOCATION}/arith.h") ENDIF() ENDIF(CMAKE_CROSSCOMPILING) DCMTK_TRY_RUN( RESULT COMPILED - ${DCMTK_BINARY_DIR}/CMakeTmp/Arith - ${DCMTK_SOURCE_DIR}/config/arith.cc + "${DCMTK_BINARY_DIR}/CMakeTmp/Arith" + "${DCMTK_SOURCE_DIR}/config/tests/arith.cc" COMPILE_DEFINITIONS -I"${DCMTK_BINARY_DIR}/config/include" -I"${DCMTK_SOURCE_DIR}/ofstd/include" -I"${DCMTK_SOURCE_DIR}/ofstd/libsrc" RUN_OUTPUT_VARIABLE OUTPUT COMPILE_OUTPUT_VARIABLE CERR - ARGS \"${ARITH_H_FILE}\" + ARGS "\\\"${ARITH_H_FILE}\\\"" ) IF(COMPILED) IF(NOT RESULT) MESSAGE(STATUS "${OUTPUT}") IF(CMAKE_CROSSCOMPILING) IF(ANDROID) - DCMTK_ANDROID_PULL(DCMTK_ANDROID_EMULATOR_INSTANCE ${ARITH_H_FILE} DESTINATION ${ARITH_H_DESTINATION}) + DCMTK_ANDROID_PULL(DCMTK_ANDROID_EMULATOR_INSTANCE "${ARITH_H_FILE}" DESTINATION "${ARITH_H_DESTINATION}") ENDIF() ENDIF(CMAKE_CROSSCOMPILING) ELSE(NOT RESULT) @@ -897,9 +1251,98 @@ FUNCTION(INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES) ELSE(COMPILED) MESSAGE(FATAL_ERROR "${CERR}") ENDIF(COMPILED) - ENDIF() # file exists + ENDIF() # file needs update ENDFUNCTION(INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES) +FUNCTION(DCMTK_ADD_CXX11_FLAGS) + STRING(FIND "${CMAKE_CXX_FLAGS}" "${DCMTK_CXX11_FLAGS}" INDEX) + IF(INDEX EQUAL -1) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DCMTK_CXX11_FLAGS}" PARENT_SCOPE) + ENDIF() +ENDFUNCTION(DCMTK_ADD_CXX11_FLAGS) + +FUNCTION(DCMTK_TEST_ENABLE_CXX11) + SET(RESULT 0) + SET(TEXT_RESULT "disabled") + IF(DCMTK_ENABLE_CXX11) + IF(DEFINED HAVE_CXX11_TEST_RESULT) + IF(HAVE_CXX11_TEST_RESULT) + DCMTK_ADD_CXX11_FLAGS() + SET(RESULT 1) + SET(TEXT_RESULT "enabled") + ENDIF() + ELSE() + DCMTK_ADD_CXX11_FLAGS() # will automatically be removed by the function scope + SET(MESSAGE "Checking whether the compiler supports C++11") + MESSAGE(STATUS "${MESSAGE}") + TRY_COMPILE(COMPILE_RESULT "${CMAKE_BINARY_DIR}" "${DCMTK_SOURCE_DIR}/config/tests/cxx11.cc") + SET(HAVE_CXX11_TEST_RESULT "${COMPILE_RESULT}" CACHE INTERNAL "Caches the configuration test result for C++11 support.") + IF(COMPILE_RESULT) + SET(RESULT 1) + SET(TEXT_RESULT "enabled") + MESSAGE(STATUS "${MESSAGE} -- yes") + ELSE() + MESSAGE(STATUS "${MESSAGE} -- no") + ENDIF() + ENDIF() + ENDIF() + SET(HAVE_CXX11 "${RESULT}" CACHE INTERNAL "Set to 1 if the compiler supports C++11 and it should be enabled.") + MESSAGE(STATUS "Info: C++11 features ${TEXT_RESULT}") + IF(RESULT) + # push C++11 CXX-flags to the parent scope + SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} PARENT_SCOPE) + ENDIF() +ENDFUNCTION(DCMTK_TEST_ENABLE_CXX11) + +FUNCTION(DCMTK_TEST_ENABLE_STL_FEATURE NAME) + STRING(TOUPPER "${NAME}" FEATURE) + IF(ARGN) + SET(SOURCEFILE "${ARGN}") + ELSE() + SET(SOURCEFILE "${NAME}") + ENDIF() + IF(DCMTK_ENABLE_STL_${FEATURE} STREQUAL "INFERRED") + SET(DCMTK_ENABLE_STL_${FEATURE} ${DCMTK_ENABLE_STL}) + ENDIF() + SET(RESULT 0) + SET(TEXT_RESULT "disabled") + IF(DCMTK_ENABLE_STL_${FEATURE} STREQUAL "ON") + IF(DEFINED HAVE_STL_${FEATURE}_TEST_RESULT) + IF(HAVE_STL_${FEATURE}_TEST_RESULT) + SET(RESULT 1) + SET(TEXT_RESULT "enabled") + ENDIF() + ELSE() + SET(MESSAGE "Checking whether STL ${NAME} works correctly") + MESSAGE(STATUS "${MESSAGE}") + DCMTK_TRY_RUN(RUN_RESULT COMPILE_RESULT "${CMAKE_BINARY_DIR}" "${DCMTK_SOURCE_DIR}/config/tests/${SOURCEFILE}.cc") + IF(COMPILE_RESULT AND RUN_RESULT EQUAL 0) + SET(RESULT 1) + SET(TEXT_RESULT "enabled") + MESSAGE(STATUS "${MESSAGE} -- yes") + ELSE() + MESSAGE(STATUS "${MESSAGE} -- no") + ENDIF() + SET(HAVE_STL_${FEATURE}_TEST_RESULT ${RESULT} CACHE INTERNAL "Caches the configuration test result for STL ${NAME}") + ENDIF() + ENDIF() + SET(HAVE_STL_${FEATURE} ${RESULT} CACHE INTERNAL "Set to 1 if the compiler/OS provides a working STL ${NAME} implementation.") + MESSAGE(STATUS "Info: STL ${NAME} support ${TEXT_RESULT}") +ENDFUNCTION(DCMTK_TEST_ENABLE_STL_FEATURE) + +DCMTK_TEST_ENABLE_CXX11() +DCMTK_TEST_ENABLE_STL_FEATURE("vector") +DCMTK_TEST_ENABLE_STL_FEATURE("algorithm" "algo") +DCMTK_TEST_ENABLE_STL_FEATURE("limits") +DCMTK_TEST_ENABLE_STL_FEATURE("list") +DCMTK_TEST_ENABLE_STL_FEATURE("map") +DCMTK_TEST_ENABLE_STL_FEATURE("memory") +DCMTK_TEST_ENABLE_STL_FEATURE("stack") +DCMTK_TEST_ENABLE_STL_FEATURE("string") +DCMTK_TEST_ENABLE_STL_FEATURE("type_traits" "ttraits") +DCMTK_TEST_ENABLE_STL_FEATURE("tuple") +DCMTK_TEST_ENABLE_STL_FEATURE("system_error" "syserr") + IF(CMAKE_CROSSCOMPILING) SET(DCMTK_CROSS_COMPILING ${CMAKE_CROSSCOMPILING}) ENDIF(CMAKE_CROSSCOMPILING) diff --git a/CMake/android.toolchain.cmake b/CMake/android.toolchain.cmake deleted file mode 100644 index 94f7da4c..00000000 --- a/CMake/android.toolchain.cmake +++ /dev/null @@ -1,1812 +0,0 @@ -# -# -# Copyright (C) 2015, OFFIS e.V. -# All rights reserved. See COPYRIGHT file for details. -# -# This software and supporting documentation were developed by -# -# OFFIS e.V. -# R&D Division Health -# Escherweg 2 -# D-26121 Oldenburg, Germany -# -# Author: Jan Schlamelcher -# -# Purpose: -# Detecting and inspecting any available Android NDK installation -# and contained toolchains. Setting the depending CMake variables -# appropriately based on the detection results and user settings. -# -# This file is based upon this Android toolchain file found on -# github: https://github.com/taka-no-me/android-cmake, -# originally released under this license: - -# Copyright (c) 2010-2011, Ethan Rublee -# Copyright (c) 2011-2014, Andrey Kamaev -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# 3. Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from this -# software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# ------------------------------------------------------------------------------ -# Android CMake toolchain file, for use with the Android NDK r5-r9 -# Requires cmake 2.6.3 or newer (2.8.5 or newer is recommended). -# See home page: https://github.com/taka-no-me/android-cmake -# -# The file is maintained by the OpenCV project. The latest version can be get at -# http://code.opencv.org/projects/opencv/repository/revisions/master/changes/android/android.toolchain.cmake -# -# Usage Linux: -# $ export ANDROID_NDK=/absolute/path/to/the/android-ndk -# $ mkdir build && cd build -# $ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/the/android.toolchain.cmake .. -# $ make -j8 -# -# Usage Linux (using standalone toolchain): -# $ export ANDROID_STANDALONE_TOOLCHAIN=/absolute/path/to/android-toolchain -# $ mkdir build && cd build -# $ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/the/android.toolchain.cmake .. -# $ make -j8 -# -# Usage Windows: -# You need native port of make to build your project. -# Android NDK r7 (or newer) already has make.exe on board. -# For older NDK you have to install it separately. -# For example, this one: http://gnuwin32.sourceforge.net/packages/make.htm -# -# $ SET ANDROID_NDK=C:\absolute\path\to\the\android-ndk -# $ mkdir build && cd build -# $ cmake.exe -G"MinGW Makefiles" -# -DCMAKE_TOOLCHAIN_FILE=path\to\the\android.toolchain.cmake -# -DCMAKE_MAKE_PROGRAM="%ANDROID_NDK%\prebuilt\windows\bin\make.exe" .. -# $ cmake.exe --build . -# -# -# Options (can be set as cmake parameters: -D=): -# ANDROID_NDK=/opt/android-ndk - path to the NDK root. -# Can be set as environment variable. Can be set only at first cmake run. -# -# ANDROID_STANDALONE_TOOLCHAIN=/opt/android-toolchain - path to the -# standalone toolchain. This option is not used if full NDK is found -# (ignored if ANDROID_NDK is set). -# Can be set as environment variable. Can be set only at first cmake run. -# -# ANDROID_ABI=armeabi-v7a - specifies the target Application Binary -# Interface (ABI). This option nearly matches to the APP_ABI variable -# used by ndk-build tool from Android NDK. -# -# Possible targets are: -# "armeabi" - matches to the NDK ABI with the same name. -# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. -# "armeabi-v7a" - matches to the NDK ABI with the same name. -# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. -# "armeabi-v7a with NEON" - same as armeabi-v7a, but -# sets NEON as floating-point unit -# "armeabi-v7a with VFPV3" - same as armeabi-v7a, but -# sets VFPV3 as floating-point unit (has 32 registers instead of 16). -# "armeabi-v6 with VFP" - tuned for ARMv6 processors having VFP. -# "x86" - matches to the NDK ABI with the same name. -# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. -# "mips" - matches to the NDK ABI with the same name. -# See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation. -# -# ANDROID_NATIVE_API_LEVEL=android-8 - level of Android API compile for. -# Option is read-only when standalone toolchain is used. -# -# ANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.6 - the name of compiler -# toolchain to be used. The list of possible values depends on the NDK -# version. For NDK r8c the possible values are: -# -# * arm-linux-androideabi-4.4.3 -# * arm-linux-androideabi-4.6 -# * arm-linux-androideabi-clang3.1 -# * mipsel-linux-android-4.4.3 -# * mipsel-linux-android-4.6 -# * mipsel-linux-android-clang3.1 -# * x86-4.4.3 -# * x86-4.6 -# * x86-clang3.1 -# -# ANDROID_FORCE_ARM_BUILD=OFF - set ON to generate 32-bit ARM instructions -# instead of Thumb. Is not available for "x86" (inapplicable) and -# "armeabi-v6 with VFP" (is forced to be ON) ABIs. -# -# ANDROID_NO_UNDEFINED=ON - set ON to show all undefined symbols as linker -# errors even if they are not used. -# -# ANDROID_SO_UNDEFINED=OFF - set ON to allow undefined symbols in shared -# libraries. Automatically turned for NDK r5x and r6x due to GLESv2 -# problems. -# -# LIBRARY_OUTPUT_PATH_ROOT=${CMAKE_BINARY_DIR} - where to output binary -# files. See additional details below. -# -# ANDROID_SET_OBSOLETE_VARIABLES=ON - if set, then toolchain defines some -# obsolete variables which were used by previous versions of this file for -# backward compatibility. -# -# ANDROID_STL=gnustl_static - specify the runtime to use. -# -# Possible values are: -# none -> Do not configure the runtime. -# system -> Use the default minimal system C++ runtime library. -# Implies -fno-rtti -fno-exceptions. -# Is not available for standalone toolchain. -# system_re -> Use the default minimal system C++ runtime library. -# Implies -frtti -fexceptions. -# Is not available for standalone toolchain. -# gabi++_static -> Use the GAbi++ runtime as a static library. -# Implies -frtti -fno-exceptions. -# Available for NDK r7 and newer. -# Is not available for standalone toolchain. -# gabi++_shared -> Use the GAbi++ runtime as a shared library. -# Implies -frtti -fno-exceptions. -# Available for NDK r7 and newer. -# Is not available for standalone toolchain. -# stlport_static -> Use the STLport runtime as a static library. -# Implies -fno-rtti -fno-exceptions for NDK before r7. -# Implies -frtti -fno-exceptions for NDK r7 and newer. -# Is not available for standalone toolchain. -# stlport_shared -> Use the STLport runtime as a shared library. -# Implies -fno-rtti -fno-exceptions for NDK before r7. -# Implies -frtti -fno-exceptions for NDK r7 and newer. -# Is not available for standalone toolchain. -# gnustl_static -> Use the GNU STL as a static library. -# Implies -frtti -fexceptions. -# gnustl_shared -> Use the GNU STL as a shared library. -# Implies -frtti -fno-exceptions. -# Available for NDK r7b and newer. -# Silently degrades to gnustl_static if not available. -# -# ANDROID_STL_FORCE_FEATURES=ON - turn rtti and exceptions support based on -# chosen runtime. If disabled, then the user is responsible for settings -# these options. -# -# What?: -# android-cmake toolchain searches for NDK/toolchain in the following order: -# ANDROID_NDK - cmake parameter -# ANDROID_NDK - environment variable -# ANDROID_STANDALONE_TOOLCHAIN - cmake parameter -# ANDROID_STANDALONE_TOOLCHAIN - environment variable -# ANDROID_NDK - default locations -# ANDROID_STANDALONE_TOOLCHAIN - default locations -# -# Make sure to do the following in your scripts: -# SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${my_cxx_flags}" ) -# SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${my_cxx_flags}" ) -# The flags will be prepopulated with critical flags, so don't loose them. -# Also be aware that toolchain also sets configuration-specific compiler -# flags and linker flags. -# -# ANDROID and BUILD_ANDROID will be set to true, you may test any of these -# variables to make necessary Android-specific configuration changes. -# -# Also ARMEABI or ARMEABI_V7A or X86 or MIPS will be set true, mutually -# exclusive. NEON option will be set true if VFP is set to NEON. -# -# LIBRARY_OUTPUT_PATH_ROOT should be set in cache to determine where Android -# libraries will be installed. -# Default is ${CMAKE_BINARY_DIR}, and the android libs will always be -# under the ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME} -# (depending on the target ABI). This is convenient for Android packaging. -# -# Change Log: -# - initial version December 2010 -# - April 2011 -# [+] added possibility to build with NDK (without standalone toolchain) -# [+] support cross-compilation on Windows (native, no cygwin support) -# [+] added compiler option to force "char" type to be signed -# [+] added toolchain option to compile to 32-bit ARM instructions -# [+] added toolchain option to disable SWIG search -# [+] added platform "armeabi-v7a with VFPV3" -# [~] ARM_TARGETS renamed to ARM_TARGET -# [+] EXECUTABLE_OUTPUT_PATH is set by toolchain (required on Windows) -# [~] Fixed bug with ANDROID_API_LEVEL variable -# [~] turn off SWIG search if it is not found first time -# - May 2011 -# [~] ANDROID_LEVEL is renamed to ANDROID_API_LEVEL -# [+] ANDROID_API_LEVEL is detected by toolchain if not specified -# [~] added guard to prevent changing of output directories on the first -# cmake pass -# [~] toolchain exits with error if ARM_TARGET is not recognized -# - June 2011 -# [~] default NDK path is updated for version r5c -# [+] variable CMAKE_SYSTEM_PROCESSOR is set based on ARM_TARGET -# [~] toolchain install directory is added to linker paths -# [-] removed SWIG-related stuff from toolchain -# [+] added macro find_host_package, find_host_program to search -# packages/programs on the host system -# [~] fixed path to STL library -# - July 2011 -# [~] fixed options caching -# [~] search for all supported NDK versions -# [~] allowed spaces in NDK path -# - September 2011 -# [~] updated for NDK r6b -# - November 2011 -# [*] rewritten for NDK r7 -# [+] x86 toolchain support (experimental) -# [+] added "armeabi-v6 with VFP" ABI for ARMv6 processors. -# [~] improved compiler and linker flags management -# [+] support different build flags for Release and Debug configurations -# [~] by default compiler flags the same as used by ndk-build (but only -# where reasonable) -# [~] ANDROID_NDK_TOOLCHAIN_ROOT is split to ANDROID_STANDALONE_TOOLCHAIN -# and ANDROID_TOOLCHAIN_ROOT -# [~] ARM_TARGET is renamed to ANDROID_ABI -# [~] ARMEABI_NDK_NAME is renamed to ANDROID_NDK_ABI_NAME -# [~] ANDROID_API_LEVEL is renamed to ANDROID_NATIVE_API_LEVEL -# - January 2012 -# [+] added stlport_static support (experimental) -# [+] added special check for cygwin -# [+] filtered out hidden files (starting with .) while globbing inside NDK -# [+] automatically applied GLESv2 linkage fix for NDK revisions 5-6 -# [+] added ANDROID_GET_ABI_RAWNAME to get NDK ABI names by CMake flags -# - February 2012 -# [+] updated for NDK r7b -# [~] fixed cmake try_compile() command -# [~] Fix for missing install_name_tool on OS X -# - March 2012 -# [~] fixed incorrect C compiler flags -# [~] fixed CMAKE_SYSTEM_PROCESSOR change on ANDROID_ABI change -# [+] improved toolchain loading speed -# [+] added assembler language support (.S) -# [+] allowed preset search paths and extra search suffixes -# - April 2012 -# [+] updated for NDK r7c -# [~] fixed most of problems with compiler/linker flags and caching -# [+] added option ANDROID_FUNCTION_LEVEL_LINKING -# - May 2012 -# [+] updated for NDK r8 -# [+] added mips architecture support -# - August 2012 -# [+] updated for NDK r8b -# [~] all intermediate files generated by toolchain are moved to CMakeFiles -# [~] libstdc++ and libsupc are removed from explicit link libraries -# [+] added CCache support (via NDK_CCACHE environment or cmake variable) -# [+] added gold linker support for NDK r8b -# [~] fixed mips linker flags for NDK r8b -# - September 2012 -# [+] added NDK release name detection (see ANDROID_NDK_RELEASE) -# [+] added support for all C++ runtimes from NDK -# (system, gabi++, stlport, gnustl) -# [+] improved warnings on known issues of NDKs -# [~] use gold linker as default if available (NDK r8b) -# [~] globally turned off rpath -# [~] compiler options are aligned with NDK r8b -# - October 2012 -# [~] fixed C++ linking: explicitly link with math library (OpenCV #2426) -# - November 2012 -# [+] updated for NDK r8c -# [+] added support for clang compiler -# - December 2012 -# [+] suppress warning about unused CMAKE_TOOLCHAIN_FILE variable -# [+] adjust API level to closest compatible as NDK does -# [~] fixed ccache full path search -# [+] updated for NDK r8d -# [~] compiler options are aligned with NDK r8d -# - March 2013 -# [+] updated for NDK r8e (x86 version) -# [+] support x86_64 version of NDK -# - April 2013 -# [+] support non-release NDK layouts (from Linaro git and Android git) -# [~] automatically detect if explicit link to crtbegin_*.o is needed -# - June 2013 -# [~] fixed stl include path for standalone toolchain made by NDK >= r8c -# - July 2013 -# [+] updated for NDK r9 -# - November 2013 -# [+] updated for NDK r9b -# - December 2013 -# [+] updated for NDK r9c -# - January 2014 -# [~] fix copying of shared STL -# - April 2014 -# [+] updated for NDK r9d -# ------------------------------------------------------------------------------ - -cmake_minimum_required( VERSION 2.8.3 ) -if( ${CMAKE_VERSION} VERSION_GREATER 3.1 OR ${CMAKE_VERSION} VERSION_EQUAL 3.1 ) - cmake_policy( SET CMP0054 NEW ) -endif() - -if( DEFINED CMAKE_CROSSCOMPILING ) - # subsequent toolchain loading is not really needed - return() -endif() - -if( CMAKE_TOOLCHAIN_FILE ) - # touch toolchain variable only to suppress "unused variable" warning -endif() - -get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) -if( _CMAKE_IN_TRY_COMPILE ) - if( NOT ANDROID_TOOLCHAIN_CONFIG_FILE ) - set( ANDROID_TOOLCHAIN_CONFIG_FILE "${CMAKE_BINARY_DIR}/../android.toolchain.config.cmake" ) - endif() - include( "${ANDROID_TOOLCHAIN_CONFIG_FILE}" ) -endif() - -# this one is important -set( CMAKE_SYSTEM_NAME Linux ) -# this one not so much -set( CMAKE_SYSTEM_VERSION 1 ) - -# rpath makes low sense for Android -set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." ) - -set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9d -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" ) -if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS) - if( CMAKE_HOST_WIN32 ) - file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS ) - set( ANDROID_NDK_SEARCH_PATHS "${ANDROID_NDK_SEARCH_PATHS}/android-ndk" "$ENV{SystemDrive}/NVPACK/android-ndk" ) - else() - file( TO_CMAKE_PATH "$ENV{HOME}" ANDROID_NDK_SEARCH_PATHS ) - set( ANDROID_NDK_SEARCH_PATHS /opt/android-ndk "${ANDROID_NDK_SEARCH_PATHS}/NVPACK/android-ndk" ) - endif() -endif() -if(NOT DEFINED ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH) - set( ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH /opt/android-toolchain ) -endif() - -set( ANDROID_SUPPORTED_ABIS_arm "armeabi-v7a;armeabi;armeabi-v7a with NEON;armeabi-v7a with VFPV3;armeabi-v6 with VFP" ) -set( ANDROID_SUPPORTED_ABIS_x86 "x86" ) -set( ANDROID_SUPPORTED_ABIS_mipsel "mips" ) - -set( ANDROID_DEFAULT_NDK_API_LEVEL 8 ) -set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 ) -set( ANDROID_DEFAULT_NDK_API_LEVEL_mips 9 ) - - -macro( __LIST_FILTER listvar regex ) - if( ${listvar} ) - foreach( __val ${${listvar}} ) - if( __val MATCHES "${regex}" ) - list( REMOVE_ITEM ${listvar} "${__val}" ) - endif() - endforeach() - endif() -endmacro() - -macro( __INIT_VARIABLE var_name ) - set( __test_path 0 ) - foreach( __var ${ARGN} ) - if( __var STREQUAL "PATH" ) - set( __test_path 1 ) - break() - endif() - endforeach() - if( __test_path AND NOT EXISTS "${${var_name}}" ) - unset( ${var_name} CACHE ) - endif() - if( "${${var_name}}" STREQUAL "" ) - set( __values 0 ) - foreach( __var ${ARGN} ) - if( __var STREQUAL "VALUES" ) - set( __values 1 ) - elseif( NOT __var STREQUAL "PATH" ) - set( __obsolete 0 ) - if( __var MATCHES "^OBSOLETE_.*$" ) - string( REPLACE "OBSOLETE_" "" __var "${__var}" ) - set( __obsolete 1 ) - endif() - if( __var MATCHES "^ENV_.*$" ) - string( REPLACE "ENV_" "" __var "${__var}" ) - set( __value "$ENV{${__var}}" ) - elseif( DEFINED ${__var} ) - set( __value "${${__var}}" ) - else() - if( __values ) - set( __value "${__var}" ) - else() - set( __value "" ) - endif() - endif() - if( NOT "${__value}" STREQUAL "" ) - if( __test_path ) - if( EXISTS "${__value}" ) - file( TO_CMAKE_PATH "${__value}" ${var_name} ) - if( __obsolete AND NOT _CMAKE_IN_TRY_COMPILE ) - message( WARNING "Using value of obsolete variable ${__var} as initial value for ${var_name}. Please note, that ${__var} can be completely removed in future versions of the toolchain." ) - endif() - break() - endif() - else() - set( ${var_name} "${__value}" ) - if( __obsolete AND NOT _CMAKE_IN_TRY_COMPILE ) - message( WARNING "Using value of obsolete variable ${__var} as initial value for ${var_name}. Please note, that ${__var} can be completely removed in future versions of the toolchain." ) - endif() - break() - endif() - endif() - endif() - endforeach() - unset( __value ) - unset( __values ) - unset( __obsolete ) - elseif( __test_path ) - file( TO_CMAKE_PATH "${${var_name}}" ${var_name} ) - endif() - unset( __test_path ) -endmacro() - -macro( __DETECT_NATIVE_API_LEVEL _var _path ) - SET( __ndkApiLevelRegex "^[\t ]*#define[\t ]+__ANDROID_API__[\t ]+([0-9]+)[\t ]*$" ) - FILE( STRINGS ${_path} __apiFileContent REGEX "${__ndkApiLevelRegex}" ) - if( NOT __apiFileContent ) - message( SEND_ERROR "Could not get Android native API level. Probably you have specified invalid level value, or your copy of NDK/toolchain is broken." ) - endif() - string( REGEX REPLACE "${__ndkApiLevelRegex}" "\\1" ${_var} "${__apiFileContent}" ) - unset( __apiFileContent ) - unset( __ndkApiLevelRegex ) -endmacro() - -macro( __DETECT_TOOLCHAIN_MACHINE_NAME _var _root ) - if( EXISTS "${_root}" ) - file( GLOB __gccExePath RELATIVE "${_root}/bin/" "${_root}/bin/*-gcc${TOOL_OS_SUFFIX}" ) - __LIST_FILTER( __gccExePath "^[.].*" ) - list( LENGTH __gccExePath __gccExePathsCount ) - if( NOT __gccExePathsCount EQUAL 1 AND NOT _CMAKE_IN_TRY_COMPILE ) - message( WARNING "Could not determine machine name for compiler from ${_root}" ) - set( ${_var} "" ) - else() - get_filename_component( __gccExeName "${__gccExePath}" NAME_WE ) - string( REPLACE "-gcc" "" ${_var} "${__gccExeName}" ) - endif() - unset( __gccExePath ) - unset( __gccExePathsCount ) - unset( __gccExeName ) - else() - set( ${_var} "" ) - endif() -endmacro() - - -# fight against cygwin -set( ANDROID_FORBID_SYGWIN TRUE CACHE BOOL "Prevent cmake from working under cygwin and using cygwin tools") -mark_as_advanced( ANDROID_FORBID_SYGWIN ) -if( ANDROID_FORBID_SYGWIN ) - if( CYGWIN ) - message( FATAL_ERROR "Android NDK and android-cmake toolchain are not welcome Cygwin. It is unlikely that this cmake toolchain will work under cygwin. But if you want to try then you can set cmake variable ANDROID_FORBID_SYGWIN to FALSE and rerun cmake." ) - endif() - - if( CMAKE_HOST_WIN32 ) - # remove cygwin from PATH - set( __new_path "$ENV{PATH}") - __LIST_FILTER( __new_path "cygwin" ) - set(ENV{PATH} "${__new_path}") - unset(__new_path) - endif() -endif() - - -# detect current host platform -if( NOT DEFINED ANDROID_NDK_HOST_X64 AND (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64" OR CMAKE_HOST_APPLE) ) - set( ANDROID_NDK_HOST_X64 1 CACHE BOOL "Try to use 64-bit compiler toolchain" ) - mark_as_advanced( ANDROID_NDK_HOST_X64 ) -endif() - -set( TOOL_OS_SUFFIX "" ) -if( CMAKE_HOST_APPLE ) - set( ANDROID_NDK_HOST_SYSTEM_NAME "darwin-x86_64" ) - set( ANDROID_NDK_HOST_SYSTEM_NAME2 "darwin-x86" ) -elseif( CMAKE_HOST_WIN32 ) - set( ANDROID_NDK_HOST_SYSTEM_NAME "windows-x86_64" ) - set( ANDROID_NDK_HOST_SYSTEM_NAME2 "windows" ) - set( TOOL_OS_SUFFIX ".exe" ) -elseif( CMAKE_HOST_UNIX ) - set( ANDROID_NDK_HOST_SYSTEM_NAME "linux-x86_64" ) - set( ANDROID_NDK_HOST_SYSTEM_NAME2 "linux-x86" ) -else() - message( FATAL_ERROR "Cross-compilation on your platform is not supported by this cmake toolchain" ) -endif() - -if( NOT ANDROID_NDK_HOST_X64 ) - set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} ) -endif() - -# see if we have path to Android NDK -__INIT_VARIABLE( ANDROID_NDK PATH ENV_ANDROID_NDK ) -if( NOT ANDROID_NDK ) - # see if we have path to Android standalone toolchain - __INIT_VARIABLE( ANDROID_STANDALONE_TOOLCHAIN PATH ENV_ANDROID_STANDALONE_TOOLCHAIN OBSOLETE_ANDROID_NDK_TOOLCHAIN_ROOT OBSOLETE_ENV_ANDROID_NDK_TOOLCHAIN_ROOT ) - - if( NOT ANDROID_STANDALONE_TOOLCHAIN ) - #try to find Android NDK in one of the the default locations - set( __ndkSearchPaths ) - foreach( __ndkSearchPath ${ANDROID_NDK_SEARCH_PATHS} ) - foreach( suffix ${ANDROID_SUPPORTED_NDK_VERSIONS} ) - list( APPEND __ndkSearchPaths "${__ndkSearchPath}${suffix}" ) - endforeach() - endforeach() - __INIT_VARIABLE( ANDROID_NDK PATH VALUES ${__ndkSearchPaths} ) - unset( __ndkSearchPaths ) - - if( ANDROID_NDK ) - message( STATUS "Using default path for Android NDK: ${ANDROID_NDK}" ) - message( STATUS " If you prefer to use a different location, please define a cmake or environment variable: ANDROID_NDK" ) - else() - #try to find Android standalone toolchain in one of the the default locations - __INIT_VARIABLE( ANDROID_STANDALONE_TOOLCHAIN PATH ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH ) - - if( ANDROID_STANDALONE_TOOLCHAIN ) - message( STATUS "Using default path for standalone toolchain ${ANDROID_STANDALONE_TOOLCHAIN}" ) - message( STATUS " If you prefer to use a different location, please define the variable: ANDROID_STANDALONE_TOOLCHAIN" ) - endif( ANDROID_STANDALONE_TOOLCHAIN ) - endif( ANDROID_NDK ) - endif( NOT ANDROID_STANDALONE_TOOLCHAIN ) -endif( NOT ANDROID_NDK ) - -# remember found paths -if( ANDROID_NDK ) - get_filename_component( ANDROID_NDK "${ANDROID_NDK}" ABSOLUTE ) - set( ANDROID_NDK "${ANDROID_NDK}" CACHE INTERNAL "Path of the Android NDK" FORCE ) - set( BUILD_WITH_ANDROID_NDK True ) - if( EXISTS "${ANDROID_NDK}/RELEASE.TXT" ) - file( STRINGS "${ANDROID_NDK}/RELEASE.TXT" ANDROID_NDK_RELEASE_FULL LIMIT_COUNT 1 REGEX r[0-9]+[a-z]? ) - string( REGEX MATCH r[0-9]+[a-z]? ANDROID_NDK_RELEASE "${ANDROID_NDK_RELEASE_FULL}" ) - else() - set( ANDROID_NDK_RELEASE "r1x" ) - set( ANDROID_NDK_RELEASE_FULL "unreleased" ) - endif() -elseif( ANDROID_STANDALONE_TOOLCHAIN ) - get_filename_component( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" ABSOLUTE ) - # try to detect change - if( CMAKE_AR ) - string( LENGTH "${ANDROID_STANDALONE_TOOLCHAIN}" __length ) - string( SUBSTRING "${CMAKE_AR}" 0 ${__length} __androidStandaloneToolchainPreviousPath ) - if( NOT __androidStandaloneToolchainPreviousPath STREQUAL ANDROID_STANDALONE_TOOLCHAIN ) - message( FATAL_ERROR "It is not possible to change path to the Android standalone toolchain on subsequent run." ) - endif() - unset( __androidStandaloneToolchainPreviousPath ) - unset( __length ) - endif() - set( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" CACHE INTERNAL "Path of the Android standalone toolchain" FORCE ) - set( BUILD_WITH_STANDALONE_TOOLCHAIN True ) -else() - list(GET ANDROID_NDK_SEARCH_PATHS 0 ANDROID_NDK_SEARCH_PATH) - message( FATAL_ERROR "Could not find neither Android NDK nor Android standalone toolchain. - You should either set an environment variable: - export ANDROID_NDK=~/my-android-ndk - or - export ANDROID_STANDALONE_TOOLCHAIN=~/my-android-toolchain - or put the toolchain or NDK in the default path: - sudo ln -s ~/my-android-ndk ${ANDROID_NDK_SEARCH_PATH} - sudo ln -s ~/my-android-toolchain ${ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH}" ) -endif() - -# android NDK layout -if( BUILD_WITH_ANDROID_NDK ) - if( NOT DEFINED ANDROID_NDK_LAYOUT ) - # try to automatically detect the layout - if( EXISTS "${ANDROID_NDK}/RELEASE.TXT") - set( ANDROID_NDK_LAYOUT "RELEASE" ) - elseif( EXISTS "${ANDROID_NDK}/../../linux-x86/toolchain/" ) - set( ANDROID_NDK_LAYOUT "LINARO" ) - elseif( EXISTS "${ANDROID_NDK}/../../gcc/" ) - set( ANDROID_NDK_LAYOUT "ANDROID" ) - endif() - endif() - set( ANDROID_NDK_LAYOUT "${ANDROID_NDK_LAYOUT}" CACHE STRING "The inner layout of NDK" ) - mark_as_advanced( ANDROID_NDK_LAYOUT ) - if( ANDROID_NDK_LAYOUT STREQUAL "LINARO" ) - set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} ) # only 32-bit at the moment - set( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK}/../../${ANDROID_NDK_HOST_SYSTEM_NAME}/toolchain" ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH "" ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH2 "" ) - elseif( ANDROID_NDK_LAYOUT STREQUAL "ANDROID" ) - set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} ) # only 32-bit at the moment - set( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK}/../../gcc/${ANDROID_NDK_HOST_SYSTEM_NAME}/arm" ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH "" ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH2 "" ) - else() # ANDROID_NDK_LAYOUT STREQUAL "RELEASE" - set( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK}/toolchains" ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH "/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME}" ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH2 "/prebuilt/${ANDROID_NDK_HOST_SYSTEM_NAME2}" ) - endif() - get_filename_component( ANDROID_NDK_TOOLCHAINS_PATH "${ANDROID_NDK_TOOLCHAINS_PATH}" ABSOLUTE ) - - # try to detect change of NDK - if( CMAKE_AR ) - string( LENGTH "${ANDROID_NDK_TOOLCHAINS_PATH}" __length ) - string( SUBSTRING "${CMAKE_AR}" 0 ${__length} __androidNdkPreviousPath ) - if( NOT __androidNdkPreviousPath STREQUAL ANDROID_NDK_TOOLCHAINS_PATH ) - message( FATAL_ERROR "It is not possible to change the path to the NDK on subsequent CMake run. You must remove all generated files from your build folder first. - " ) - endif() - unset( __androidNdkPreviousPath ) - unset( __length ) - endif() -endif() - - -# get all the details about standalone toolchain -if( BUILD_WITH_STANDALONE_TOOLCHAIN ) - __DETECT_NATIVE_API_LEVEL( ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_STANDALONE_TOOLCHAIN}/sysroot/usr/include/android/api-level.h" ) - set( ANDROID_STANDALONE_TOOLCHAIN_API_LEVEL ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} ) - set( __availableToolchains "standalone" ) - __DETECT_TOOLCHAIN_MACHINE_NAME( __availableToolchainMachines "${ANDROID_STANDALONE_TOOLCHAIN}" ) - if( NOT __availableToolchainMachines ) - message( FATAL_ERROR "Could not determine machine name of your toolchain. Probably your Android standalone toolchain is broken." ) - endif() - if( __availableToolchainMachines MATCHES i686 ) - set( __availableToolchainArchs "x86" ) - elseif( __availableToolchainMachines MATCHES arm ) - set( __availableToolchainArchs "arm" ) - elseif( __availableToolchainMachines MATCHES mipsel ) - set( __availableToolchainArchs "mipsel" ) - endif() - execute_process( COMMAND "${ANDROID_STANDALONE_TOOLCHAIN}/bin/${__availableToolchainMachines}-gcc${TOOL_OS_SUFFIX}" -dumpversion - OUTPUT_VARIABLE __availableToolchainCompilerVersions OUTPUT_STRIP_TRAILING_WHITESPACE ) - string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9]+)?" __availableToolchainCompilerVersions "${__availableToolchainCompilerVersions}" ) - if( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/bin/clang${TOOL_OS_SUFFIX}" ) - list( APPEND __availableToolchains "standalone-clang" ) - list( APPEND __availableToolchainMachines ${__availableToolchainMachines} ) - list( APPEND __availableToolchainArchs ${__availableToolchainArchs} ) - list( APPEND __availableToolchainCompilerVersions ${__availableToolchainCompilerVersions} ) - endif() -endif() - -macro( __GLOB_NDK_TOOLCHAINS __availableToolchainsVar __availableToolchainsLst __toolchain_subpath ) - foreach( __toolchain ${${__availableToolchainsLst}} ) - if( "${__toolchain}" MATCHES "-clang3[.][0-9]$" AND NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}${__toolchain_subpath}" ) - string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" ) - else() - set( __gcc_toolchain "${__toolchain}" ) - endif() - __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK_TOOLCHAINS_PATH}/${__gcc_toolchain}${__toolchain_subpath}" ) - if( __machine ) - string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" ) - if( __machine MATCHES i686 ) - set( __arch "x86" ) - elseif( __machine MATCHES arm ) - set( __arch "arm" ) - elseif( __machine MATCHES mipsel ) - set( __arch "mipsel" ) - else() - unset( __arch ) - endif() - if( __arch ) - list( APPEND __availableToolchainMachines "${__machine}" ) - list( APPEND __availableToolchainArchs "${__arch}" ) - list( APPEND __availableToolchainCompilerVersions "${__version}" ) - list( APPEND ${__availableToolchainsVar} "${__toolchain}" ) - endif() - endif() - unset( __gcc_toolchain ) - endforeach() -endmacro() - -# get all the details about NDK -if( BUILD_WITH_ANDROID_NDK ) - file( GLOB ANDROID_SUPPORTED_NATIVE_API_LEVELS RELATIVE "${ANDROID_NDK}/platforms" "${ANDROID_NDK}/platforms/android-*" ) - string( REPLACE "android-" "" ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_SUPPORTED_NATIVE_API_LEVELS}" ) - set( __availableToolchains "" ) - set( __availableToolchainMachines "" ) - set( __availableToolchainArchs "" ) - set( __availableToolchainCompilerVersions "" ) - if( ANDROID_TOOLCHAIN_NAME AND EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_TOOLCHAIN_NAME}/" ) - # do not go through all toolchains if we know the name - set( __availableToolchainsLst "${ANDROID_TOOLCHAIN_NAME}" ) - __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH}" ) - if( NOT __availableToolchains AND NOT ANDROID_NDK_TOOLCHAINS_SUBPATH STREQUAL ANDROID_NDK_TOOLCHAINS_SUBPATH2 ) - __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH2}" ) - if( __availableToolchains ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH ${ANDROID_NDK_TOOLCHAINS_SUBPATH2} ) - endif() - endif() - endif() - if( NOT __availableToolchains ) - file( GLOB __availableToolchainsLst RELATIVE "${ANDROID_NDK_TOOLCHAINS_PATH}" "${ANDROID_NDK_TOOLCHAINS_PATH}/*" ) - if( __availableToolchains ) - list(SORT __availableToolchainsLst) # we need clang to go after gcc - endif() - __LIST_FILTER( __availableToolchainsLst "^[.]" ) - __LIST_FILTER( __availableToolchainsLst "llvm" ) - __LIST_FILTER( __availableToolchainsLst "renderscript" ) - __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH}" ) - if( NOT __availableToolchains AND NOT ANDROID_NDK_TOOLCHAINS_SUBPATH STREQUAL ANDROID_NDK_TOOLCHAINS_SUBPATH2 ) - __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH2}" ) - if( __availableToolchains ) - set( ANDROID_NDK_TOOLCHAINS_SUBPATH ${ANDROID_NDK_TOOLCHAINS_SUBPATH2} ) - endif() - endif() - endif() - if( NOT __availableToolchains ) - message( FATAL_ERROR "Could not find any working toolchain in the NDK. Probably your Android NDK is broken." ) - endif() -endif() - -# build list of available ABIs -set( ANDROID_SUPPORTED_ABIS "" ) -set( __uniqToolchainArchNames ${__availableToolchainArchs} ) -list( REMOVE_DUPLICATES __uniqToolchainArchNames ) -list( SORT __uniqToolchainArchNames ) -foreach( __arch ${__uniqToolchainArchNames} ) - list( APPEND ANDROID_SUPPORTED_ABIS ${ANDROID_SUPPORTED_ABIS_${__arch}} ) -endforeach() -unset( __uniqToolchainArchNames ) -if( NOT ANDROID_SUPPORTED_ABIS ) - message( FATAL_ERROR "No one of known Android ABIs is supported by this cmake toolchain." ) -endif() - -# choose target ABI -__INIT_VARIABLE( ANDROID_ABI OBSOLETE_ARM_TARGET OBSOLETE_ARM_TARGETS VALUES ${ANDROID_SUPPORTED_ABIS} ) -# verify that target ABI is supported -list( FIND ANDROID_SUPPORTED_ABIS "${ANDROID_ABI}" __androidAbiIdx ) -if( __androidAbiIdx EQUAL -1 ) - string( REPLACE ";" "\", \"" PRINTABLE_ANDROID_SUPPORTED_ABIS "${ANDROID_SUPPORTED_ABIS}" ) - message( FATAL_ERROR "Specified ANDROID_ABI = \"${ANDROID_ABI}\" is not supported by this cmake toolchain or your NDK/toolchain. - Supported values are: \"${PRINTABLE_ANDROID_SUPPORTED_ABIS}\" - " ) -endif() -unset( __androidAbiIdx ) - -# set target ABI options -if( ANDROID_ABI STREQUAL "x86" ) - set( X86 true ) - set( ANDROID_NDK_ABI_NAME "x86" ) - set( ANDROID_ARCH_NAME "x86" ) - set( ANDROID_ARCH_FULLNAME "x86" ) - set( ANDROID_LLVM_TRIPLE "i686-none-linux-android" ) - set( CMAKE_SYSTEM_PROCESSOR "i686" ) -elseif( ANDROID_ABI STREQUAL "mips" ) - set( MIPS true ) - set( ANDROID_NDK_ABI_NAME "mips" ) - set( ANDROID_ARCH_NAME "mips" ) - set( ANDROID_ARCH_FULLNAME "mipsel" ) - set( ANDROID_LLVM_TRIPLE "mipsel-none-linux-android" ) - set( CMAKE_SYSTEM_PROCESSOR "mips" ) -elseif( ANDROID_ABI STREQUAL "armeabi" ) - set( ARMEABI true ) - set( ANDROID_NDK_ABI_NAME "armeabi" ) - set( ANDROID_ARCH_NAME "arm" ) - set( ANDROID_ARCH_FULLNAME "arm" ) - set( ANDROID_LLVM_TRIPLE "armv5te-none-linux-androideabi" ) - set( CMAKE_SYSTEM_PROCESSOR "armv5te" ) -elseif( ANDROID_ABI STREQUAL "armeabi-v6 with VFP" ) - set( ARMEABI_V6 true ) - set( ANDROID_NDK_ABI_NAME "armeabi" ) - set( ANDROID_ARCH_NAME "arm" ) - set( ANDROID_ARCH_FULLNAME "arm" ) - set( ANDROID_LLVM_TRIPLE "armv5te-none-linux-androideabi" ) - set( CMAKE_SYSTEM_PROCESSOR "armv6" ) - # need always fallback to older platform - set( ARMEABI true ) -elseif( ANDROID_ABI STREQUAL "armeabi-v7a") - set( ARMEABI_V7A true ) - set( ANDROID_NDK_ABI_NAME "armeabi-v7a" ) - set( ANDROID_ARCH_NAME "arm" ) - set( ANDROID_ARCH_FULLNAME "arm" ) - set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" ) - set( CMAKE_SYSTEM_PROCESSOR "armv7-a" ) -elseif( ANDROID_ABI STREQUAL "armeabi-v7a with VFPV3" ) - set( ARMEABI_V7A true ) - set( ANDROID_NDK_ABI_NAME "armeabi-v7a" ) - set( ANDROID_ARCH_NAME "arm" ) - set( ANDROID_ARCH_FULLNAME "arm" ) - set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" ) - set( CMAKE_SYSTEM_PROCESSOR "armv7-a" ) - set( VFPV3 true ) -elseif( ANDROID_ABI STREQUAL "armeabi-v7a with NEON" ) - set( ARMEABI_V7A true ) - set( ANDROID_NDK_ABI_NAME "armeabi-v7a" ) - set( ANDROID_ARCH_NAME "arm" ) - set( ANDROID_ARCH_FULLNAME "arm" ) - set( ANDROID_LLVM_TRIPLE "armv7-none-linux-androideabi" ) - set( CMAKE_SYSTEM_PROCESSOR "armv7-a" ) - set( VFPV3 true ) - set( NEON true ) -else() - message( SEND_ERROR "Unknown ANDROID_ABI=\"${ANDROID_ABI}\" is specified." ) -endif() - -if( CMAKE_BINARY_DIR AND EXISTS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake" ) - # really dirty hack - # it is not possible to change CMAKE_SYSTEM_PROCESSOR after the first run... - file( APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake" "SET(CMAKE_SYSTEM_PROCESSOR \"${CMAKE_SYSTEM_PROCESSOR}\")\n" ) -endif() - -if( ANDROID_ARCH_NAME STREQUAL "arm" AND NOT ARMEABI_V6 ) - __INIT_VARIABLE( ANDROID_FORCE_ARM_BUILD OBSOLETE_FORCE_ARM VALUES OFF ) - set( ANDROID_FORCE_ARM_BUILD ${ANDROID_FORCE_ARM_BUILD} CACHE BOOL "Use 32-bit ARM instructions instead of Thumb-1" FORCE ) - mark_as_advanced( ANDROID_FORCE_ARM_BUILD ) -else() - unset( ANDROID_FORCE_ARM_BUILD CACHE ) -endif() - -# choose toolchain -if( ANDROID_TOOLCHAIN_NAME ) - list( FIND __availableToolchains "${ANDROID_TOOLCHAIN_NAME}" __toolchainIdx ) - if( __toolchainIdx EQUAL -1 ) - list( SORT __availableToolchains ) - string( REPLACE ";" "\n * " toolchains_list "${__availableToolchains}" ) - set( toolchains_list " * ${toolchains_list}") - message( FATAL_ERROR "Specified toolchain \"${ANDROID_TOOLCHAIN_NAME}\" is missing in your NDK or broken. Please verify that your NDK is working or select another compiler toolchain. -To configure the toolchain set CMake variable ANDROID_TOOLCHAIN_NAME to one of the following values:\n${toolchains_list}\n" ) - endif() - list( GET __availableToolchainArchs ${__toolchainIdx} __toolchainArch ) - if( NOT __toolchainArch STREQUAL ANDROID_ARCH_FULLNAME ) - message( SEND_ERROR "Selected toolchain \"${ANDROID_TOOLCHAIN_NAME}\" is not able to compile binaries for the \"${ANDROID_ARCH_NAME}\" platform." ) - endif() -else() - set( __toolchainIdx -1 ) - set( __applicableToolchains "" ) - set( __toolchainMaxVersion "0.0.0" ) - list( LENGTH __availableToolchains __availableToolchainsCount ) - math( EXPR __availableToolchainsCount "${__availableToolchainsCount}-1" ) - foreach( __idx RANGE ${__availableToolchainsCount} ) - list( GET __availableToolchainArchs ${__idx} __toolchainArch ) - if( __toolchainArch STREQUAL ANDROID_ARCH_FULLNAME ) - list( GET __availableToolchainCompilerVersions ${__idx} __toolchainVersion ) - string( REPLACE "x" "99" __toolchainVersion "${__toolchainVersion}") - if( __toolchainVersion VERSION_GREATER __toolchainMaxVersion ) - set( __toolchainMaxVersion "${__toolchainVersion}" ) - set( __toolchainIdx ${__idx} ) - endif() - endif() - endforeach() - unset( __availableToolchainsCount ) - unset( __toolchainMaxVersion ) - unset( __toolchainVersion ) -endif() -unset( __toolchainArch ) -if( __toolchainIdx EQUAL -1 ) - message( FATAL_ERROR "No one of available compiler toolchains is able to compile for ${ANDROID_ARCH_NAME} platform." ) -endif() -list( GET __availableToolchains ${__toolchainIdx} ANDROID_TOOLCHAIN_NAME ) -list( GET __availableToolchainMachines ${__toolchainIdx} ANDROID_TOOLCHAIN_MACHINE_NAME ) -list( GET __availableToolchainCompilerVersions ${__toolchainIdx} ANDROID_COMPILER_VERSION ) - -unset( __toolchainIdx ) -unset( __availableToolchains ) -unset( __availableToolchainMachines ) -unset( __availableToolchainArchs ) -unset( __availableToolchainCompilerVersions ) - -# choose native API level -__INIT_VARIABLE( ANDROID_NATIVE_API_LEVEL ENV_ANDROID_NATIVE_API_LEVEL ANDROID_API_LEVEL ENV_ANDROID_API_LEVEL ANDROID_STANDALONE_TOOLCHAIN_API_LEVEL ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME} ANDROID_DEFAULT_NDK_API_LEVEL ) -string( REGEX MATCH "[0-9]+" ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" ) -# adjust API level -set( __real_api_level ${ANDROID_DEFAULT_NDK_API_LEVEL_${ANDROID_ARCH_NAME}} ) -foreach( __level ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} ) - if( NOT __level GREATER ANDROID_NATIVE_API_LEVEL AND NOT __level LESS __real_api_level ) - set( __real_api_level ${__level} ) - endif() -endforeach() -if( __real_api_level AND NOT ANDROID_NATIVE_API_LEVEL EQUAL __real_api_level ) - message( STATUS "Adjusting Android API level 'android-${ANDROID_NATIVE_API_LEVEL}' to 'android-${__real_api_level}'") - set( ANDROID_NATIVE_API_LEVEL ${__real_api_level} ) -endif() -unset(__real_api_level) -# validate -list( FIND ANDROID_SUPPORTED_NATIVE_API_LEVELS "${ANDROID_NATIVE_API_LEVEL}" __levelIdx ) -if( __levelIdx EQUAL -1 ) - message( SEND_ERROR "Specified Android native API level 'android-${ANDROID_NATIVE_API_LEVEL}' is not supported by your NDK/toolchain." ) -else() - if( BUILD_WITH_ANDROID_NDK ) - __DETECT_NATIVE_API_LEVEL( __realApiLevel "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}/usr/include/android/api-level.h" ) - if( NOT __realApiLevel EQUAL ANDROID_NATIVE_API_LEVEL ) - message( SEND_ERROR "Specified Android API level (${ANDROID_NATIVE_API_LEVEL}) does not match to the level found (${__realApiLevel}). Probably your copy of NDK is broken." ) - endif() - unset( __realApiLevel ) - endif() - set( ANDROID_NATIVE_API_LEVEL "${ANDROID_NATIVE_API_LEVEL}" CACHE STRING "Android API level for native code" FORCE ) - if( CMAKE_VERSION VERSION_GREATER "2.8" ) - list( SORT ANDROID_SUPPORTED_NATIVE_API_LEVELS ) - set_property( CACHE ANDROID_NATIVE_API_LEVEL PROPERTY STRINGS ${ANDROID_SUPPORTED_NATIVE_API_LEVELS} ) - endif() -endif() -unset( __levelIdx ) - - -# remember target ABI -set( ANDROID_ABI "${ANDROID_ABI}" CACHE STRING "The target ABI for Android. If arm, then armeabi-v7a is recommended for hardware floating point." FORCE ) -if( CMAKE_VERSION VERSION_GREATER "2.8" ) - list( SORT ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_FULLNAME} ) - set_property( CACHE ANDROID_ABI PROPERTY STRINGS ${ANDROID_SUPPORTED_ABIS_${ANDROID_ARCH_FULLNAME}} ) -endif() - - -# runtime choice (STL, rtti, exceptions) -if( NOT ANDROID_STL ) - # honor legacy ANDROID_USE_STLPORT - if( DEFINED ANDROID_USE_STLPORT ) - if( ANDROID_USE_STLPORT ) - set( ANDROID_STL stlport_static ) - endif() - message( WARNING "You are using an obsolete variable ANDROID_USE_STLPORT to select the STL variant. Use -DANDROID_STL=stlport_static instead." ) - endif() - if( NOT ANDROID_STL ) - set( ANDROID_STL gnustl_static ) - endif() -endif() -set( ANDROID_STL "${ANDROID_STL}" CACHE STRING "C++ runtime" ) -set( ANDROID_STL_FORCE_FEATURES ON CACHE BOOL "automatically configure rtti and exceptions support based on C++ runtime" ) -mark_as_advanced( ANDROID_STL ANDROID_STL_FORCE_FEATURES ) - -if( BUILD_WITH_ANDROID_NDK ) - if( NOT "${ANDROID_STL}" MATCHES "^(none|system|system_re|gabi\\+\\+_static|gabi\\+\\+_shared|stlport_static|stlport_shared|gnustl_static|gnustl_shared)$") - message( FATAL_ERROR "ANDROID_STL is set to invalid value \"${ANDROID_STL}\". -The possible values are: - none -> Do not configure the runtime. - system -> Use the default minimal system C++ runtime library. - system_re -> Same as system but with rtti and exceptions. - gabi++_static -> Use the GAbi++ runtime as a static library. - gabi++_shared -> Use the GAbi++ runtime as a shared library. - stlport_static -> Use the STLport runtime as a static library. - stlport_shared -> Use the STLport runtime as a shared library. - gnustl_static -> (default) Use the GNU STL as a static library. - gnustl_shared -> Use the GNU STL as a shared library. -" ) - endif() -elseif( BUILD_WITH_STANDALONE_TOOLCHAIN ) - if( NOT "${ANDROID_STL}" MATCHES "^(none|gnustl_static|gnustl_shared)$") - message( FATAL_ERROR "ANDROID_STL is set to invalid value \"${ANDROID_STL}\". -The possible values are: - none -> Do not configure the runtime. - gnustl_static -> (default) Use the GNU STL as a static library. - gnustl_shared -> Use the GNU STL as a shared library. -" ) - endif() -endif() - -unset( ANDROID_RTTI ) -unset( ANDROID_EXCEPTIONS ) -unset( ANDROID_STL_INCLUDE_DIRS ) -unset( __libstl ) -unset( __libsupcxx ) - -if( NOT _CMAKE_IN_TRY_COMPILE AND ANDROID_NDK_RELEASE STREQUAL "r7b" AND ARMEABI_V7A AND NOT VFPV3 AND ANDROID_STL MATCHES "gnustl" ) - message( WARNING "The GNU STL armeabi-v7a binaries from NDK r7b can crash non-NEON devices. The files provided with NDK r7b were not configured properly, resulting in crashes on Tegra2-based devices and others when trying to use certain floating-point functions (e.g., cosf, sinf, expf). -You are strongly recommended to switch to another NDK release. -" ) -endif() - -if( NOT _CMAKE_IN_TRY_COMPILE AND X86 AND ANDROID_STL MATCHES "gnustl" AND ANDROID_NDK_RELEASE STREQUAL "r6" ) - message( WARNING "The x86 system header file from NDK r6 has incorrect definition for ptrdiff_t. You are recommended to upgrade to a newer NDK release or manually patch the header: -See https://android.googlesource.com/platform/development.git f907f4f9d4e56ccc8093df6fee54454b8bcab6c2 - diff --git a/ndk/platforms/android-9/arch-x86/include/machine/_types.h b/ndk/platforms/android-9/arch-x86/include/machine/_types.h - index 5e28c64..65892a1 100644 - --- a/ndk/platforms/android-9/arch-x86/include/machine/_types.h - +++ b/ndk/platforms/android-9/arch-x86/include/machine/_types.h - @@ -51,7 +51,11 @@ typedef long int ssize_t; - #endif - #ifndef _PTRDIFF_T - #define _PTRDIFF_T - -typedef long ptrdiff_t; - +# ifdef __ANDROID__ - + typedef int ptrdiff_t; - +# else - + typedef long ptrdiff_t; - +# endif - #endif -" ) -endif() - - -# setup paths and STL for standalone toolchain -if( BUILD_WITH_STANDALONE_TOOLCHAIN ) - set( ANDROID_TOOLCHAIN_ROOT "${ANDROID_STANDALONE_TOOLCHAIN}" ) - set( ANDROID_CLANG_TOOLCHAIN_ROOT "${ANDROID_STANDALONE_TOOLCHAIN}" ) - set( ANDROID_SYSROOT "${ANDROID_STANDALONE_TOOLCHAIN}/sysroot" ) - - if( NOT ANDROID_STL STREQUAL "none" ) - set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/include/c++/${ANDROID_COMPILER_VERSION}" ) - if( NOT EXISTS "${ANDROID_STL_INCLUDE_DIRS}" ) - # old location ( pre r8c ) - set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}" ) - endif() - if( ARMEABI_V7A AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}/bits" ) - list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}" ) - elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb/bits" ) - list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb" ) - else() - list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" ) - endif() - # always search static GNU STL to get the location of libsupc++.a - if( ARMEABI_V7A AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libstdc++.a" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb" ) - elseif( ARMEABI_V7A AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libstdc++.a" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}" ) - elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libstdc++.a" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb" ) - elseif( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libstdc++.a" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib" ) - endif() - if( __libstl ) - set( __libsupcxx "${__libstl}/libsupc++.a" ) - set( __libstl "${__libstl}/libstdc++.a" ) - endif() - if( NOT EXISTS "${__libsupcxx}" ) - message( FATAL_ERROR "The required libstdsupc++.a is missing in your standalone toolchain. - Usually it happens because of bug in make-standalone-toolchain.sh script from NDK r7, r7b and r7c. - You need to either upgrade to newer NDK or manually copy - $ANDROID_NDK/sources/cxx-stl/gnu-libstdc++/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a - to - ${__libsupcxx} - " ) - endif() - if( ANDROID_STL STREQUAL "gnustl_shared" ) - if( ARMEABI_V7A AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libgnustl_shared.so" ) - elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libgnustl_shared.so" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libgnustl_shared.so" ) - elseif( EXISTS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libgnustl_shared.so" ) - set( __libstl "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libgnustl_shared.so" ) - endif() - endif() - endif() -endif() - -# clang -if( "${ANDROID_TOOLCHAIN_NAME}" STREQUAL "standalone-clang" ) - set( ANDROID_COMPILER_IS_CLANG 1 ) - execute_process( COMMAND "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/clang${TOOL_OS_SUFFIX}" --version OUTPUT_VARIABLE ANDROID_CLANG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE ) - string( REGEX MATCH "[0-9]+[.][0-9]+" ANDROID_CLANG_VERSION "${ANDROID_CLANG_VERSION}") -elseif( "${ANDROID_TOOLCHAIN_NAME}" MATCHES "-clang3[.][0-9]?$" ) - string( REGEX MATCH "3[.][0-9]$" ANDROID_CLANG_VERSION "${ANDROID_TOOLCHAIN_NAME}") - string( REGEX REPLACE "-clang${ANDROID_CLANG_VERSION}$" "-4.6" ANDROID_GCC_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" ) - if( NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/llvm-${ANDROID_CLANG_VERSION}${ANDROID_NDK_TOOLCHAINS_SUBPATH}/bin/clang${TOOL_OS_SUFFIX}" ) - message( FATAL_ERROR "Could not find the Clang compiler driver" ) - endif() - set( ANDROID_COMPILER_IS_CLANG 1 ) - set( ANDROID_CLANG_TOOLCHAIN_ROOT "${ANDROID_NDK_TOOLCHAINS_PATH}/llvm-${ANDROID_CLANG_VERSION}${ANDROID_NDK_TOOLCHAINS_SUBPATH}" ) -else() - set( ANDROID_GCC_TOOLCHAIN_NAME "${ANDROID_TOOLCHAIN_NAME}" ) - unset( ANDROID_COMPILER_IS_CLANG CACHE ) -endif() - -string( REPLACE "." "" _clang_name "clang${ANDROID_CLANG_VERSION}" ) -if( NOT EXISTS "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}${TOOL_OS_SUFFIX}" ) - set( _clang_name "clang" ) -endif() - - -# setup paths and STL for NDK -if( BUILD_WITH_ANDROID_NDK ) - set( ANDROID_TOOLCHAIN_ROOT "${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}${ANDROID_NDK_TOOLCHAINS_SUBPATH}" ) - set( ANDROID_SYSROOT "${ANDROID_NDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/arch-${ANDROID_ARCH_NAME}" ) - - if( ANDROID_STL STREQUAL "none" ) - # do nothing - elseif( ANDROID_STL STREQUAL "system" ) - set( ANDROID_RTTI OFF ) - set( ANDROID_EXCEPTIONS OFF ) - set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/system/include" ) - elseif( ANDROID_STL STREQUAL "system_re" ) - set( ANDROID_RTTI ON ) - set( ANDROID_EXCEPTIONS ON ) - set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/system/include" ) - elseif( ANDROID_STL MATCHES "gabi" ) - if( ANDROID_NDK_RELEASE STRLESS "r7" ) - message( FATAL_ERROR "gabi++ is not awailable in your NDK. You have to upgrade to NDK r7 or newer to use gabi++.") - endif() - set( ANDROID_RTTI ON ) - set( ANDROID_EXCEPTIONS OFF ) - set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/gabi++/include" ) - set( __libstl "${ANDROID_NDK}/sources/cxx-stl/gabi++/libs/${ANDROID_NDK_ABI_NAME}/libgabi++_static.a" ) - elseif( ANDROID_STL MATCHES "stlport" ) - if( NOT ANDROID_NDK_RELEASE STRLESS "r8d" ) - set( ANDROID_EXCEPTIONS ON ) - else() - set( ANDROID_EXCEPTIONS OFF ) - endif() - if( ANDROID_NDK_RELEASE STRLESS "r7" ) - set( ANDROID_RTTI OFF ) - else() - set( ANDROID_RTTI ON ) - endif() - set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/cxx-stl/stlport/stlport" ) - set( __libstl "${ANDROID_NDK}/sources/cxx-stl/stlport/libs/${ANDROID_NDK_ABI_NAME}/libstlport_static.a" ) - elseif( ANDROID_STL MATCHES "gnustl" ) - set( ANDROID_EXCEPTIONS ON ) - set( ANDROID_RTTI ON ) - if( EXISTS "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}" ) - if( ARMEABI_V7A AND ANDROID_COMPILER_VERSION VERSION_EQUAL "4.7" AND ANDROID_NDK_RELEASE STREQUAL "r8d" ) - # gnustl binary for 4.7 compiler is buggy :( - # TODO: look for right fix - set( __libstl "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/4.6" ) - else() - set( __libstl "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}" ) - endif() - else() - set( __libstl "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++" ) - endif() - set( ANDROID_STL_INCLUDE_DIRS "${__libstl}/include" "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/include" ) - if( EXISTS "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libgnustl_static.a" ) - set( __libstl "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libgnustl_static.a" ) - else() - set( __libstl "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libstdc++.a" ) - endif() - else() - message( FATAL_ERROR "Unknown runtime: ${ANDROID_STL}" ) - endif() - # find libsupc++.a - rtti & exceptions - if( ANDROID_STL STREQUAL "system_re" OR ANDROID_STL MATCHES "gnustl" ) - set( __libsupcxx "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" ) # r8b or newer - if( NOT EXISTS "${__libsupcxx}" ) - set( __libsupcxx "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/libs/${ANDROID_NDK_ABI_NAME}/libsupc++.a" ) # r7-r8 - endif() - if( NOT EXISTS "${__libsupcxx}" ) # before r7 - if( ARMEABI_V7A ) - if( ANDROID_FORCE_ARM_BUILD ) - set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/libsupc++.a" ) - else() - set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/${CMAKE_SYSTEM_PROCESSOR}/thumb/libsupc++.a" ) - endif() - elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD ) - set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/thumb/libsupc++.a" ) - else() - set( __libsupcxx "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/lib/libsupc++.a" ) - endif() - endif() - if( NOT EXISTS "${__libsupcxx}") - message( ERROR "Could not find libsupc++.a for a chosen platform. Either your NDK is not supported or is broken.") - endif() - endif() -endif() - - -# case of shared STL linkage -if( ANDROID_STL MATCHES "shared" AND DEFINED __libstl ) - string( REPLACE "_static.a" "_shared.so" __libstl "${__libstl}" ) - # TODO: check if .so file exists before the renaming -endif() - - -# ccache support -__INIT_VARIABLE( _ndk_ccache NDK_CCACHE ENV_NDK_CCACHE ) -if( _ndk_ccache ) - if( DEFINED NDK_CCACHE AND NOT EXISTS NDK_CCACHE ) - unset( NDK_CCACHE CACHE ) - endif() - find_program( NDK_CCACHE "${_ndk_ccache}" DOC "The path to ccache binary") -else() - unset( NDK_CCACHE CACHE ) -endif() -unset( _ndk_ccache ) - - -# setup the cross-compiler -if( NOT CMAKE_C_COMPILER ) - if( NDK_CCACHE AND NOT ANDROID_SYSROOT MATCHES "[ ;\"]" ) - set( CMAKE_C_COMPILER "${NDK_CCACHE}" CACHE PATH "ccache as C compiler" ) - set( CMAKE_CXX_COMPILER "${NDK_CCACHE}" CACHE PATH "ccache as C++ compiler" ) - if( ANDROID_COMPILER_IS_CLANG ) - set( CMAKE_C_COMPILER_ARG1 "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}${TOOL_OS_SUFFIX}" CACHE PATH "C compiler") - set( CMAKE_CXX_COMPILER_ARG1 "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler") - else() - set( CMAKE_C_COMPILER_ARG1 "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}" CACHE PATH "C compiler") - set( CMAKE_CXX_COMPILER_ARG1 "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler") - endif() - else() - if( ANDROID_COMPILER_IS_CLANG ) - set( CMAKE_C_COMPILER "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}${TOOL_OS_SUFFIX}" CACHE PATH "C compiler") - set( CMAKE_CXX_COMPILER "${ANDROID_CLANG_TOOLCHAIN_ROOT}/bin/${_clang_name}++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler") - else() - set( CMAKE_C_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}" CACHE PATH "C compiler" ) - set( CMAKE_CXX_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-g++${TOOL_OS_SUFFIX}" CACHE PATH "C++ compiler" ) - endif() - endif() - set( CMAKE_ASM_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}" CACHE PATH "assembler" ) - set( CMAKE_STRIP "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-strip${TOOL_OS_SUFFIX}" CACHE PATH "strip" ) - set( CMAKE_AR "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ar${TOOL_OS_SUFFIX}" CACHE PATH "archive" ) - set( CMAKE_LINKER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ld${TOOL_OS_SUFFIX}" CACHE PATH "linker" ) - set( CMAKE_NM "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-nm${TOOL_OS_SUFFIX}" CACHE PATH "nm" ) - set( CMAKE_OBJCOPY "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objcopy${TOOL_OS_SUFFIX}" CACHE PATH "objcopy" ) - set( CMAKE_OBJDUMP "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-objdump${TOOL_OS_SUFFIX}" CACHE PATH "objdump" ) - set( CMAKE_RANLIB "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ranlib${TOOL_OS_SUFFIX}" CACHE PATH "ranlib" ) -endif() - -set( _CMAKE_TOOLCHAIN_PREFIX "${ANDROID_TOOLCHAIN_MACHINE_NAME}-" ) -if( CMAKE_VERSION VERSION_LESS 2.8.5 ) - set( CMAKE_ASM_COMPILER_ARG1 "-c" ) -endif() -if( APPLE ) - find_program( CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool ) - if( NOT CMAKE_INSTALL_NAME_TOOL ) - message( FATAL_ERROR "Could not find install_name_tool, please check your installation." ) - endif() - mark_as_advanced( CMAKE_INSTALL_NAME_TOOL ) -endif() - -# Force set compilers because standard identification works badly for us -include( CMakeForceCompiler ) -CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU ) -if( ANDROID_COMPILER_IS_CLANG ) - set( CMAKE_C_COMPILER_ID Clang) -endif() -set( CMAKE_C_PLATFORM_ID Linux ) -set( CMAKE_C_SIZEOF_DATA_PTR 4 ) -set( CMAKE_C_HAS_ISYSROOT 1 ) -set( CMAKE_C_COMPILER_ABI ELF ) -CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU ) -if( ANDROID_COMPILER_IS_CLANG ) - set( CMAKE_CXX_COMPILER_ID Clang) -endif() -set( CMAKE_CXX_PLATFORM_ID Linux ) -set( CMAKE_CXX_SIZEOF_DATA_PTR 4 ) -set( CMAKE_CXX_HAS_ISYSROOT 1 ) -set( CMAKE_CXX_COMPILER_ABI ELF ) -set( CMAKE_CXX_SOURCE_FILE_EXTENSIONS cc cp cxx cpp CPP c++ C ) -# force ASM compiler (required for CMake < 2.8.5) -set( CMAKE_ASM_COMPILER_ID_RUN TRUE ) -set( CMAKE_ASM_COMPILER_ID GNU ) -set( CMAKE_ASM_COMPILER_WORKS TRUE ) -set( CMAKE_ASM_COMPILER_FORCED TRUE ) -set( CMAKE_COMPILER_IS_GNUASM 1) -set( CMAKE_ASM_SOURCE_FILE_EXTENSIONS s S asm ) - -# flags and definitions -remove_definitions( -DANDROID ) -add_definitions( -DANDROID ) - -if( ANDROID_SYSROOT MATCHES "[ ;\"]" ) - if( CMAKE_HOST_WIN32 ) - # try to convert path to 8.3 form - file( WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cvt83.cmd" "@echo %~s1" ) - execute_process( COMMAND "$ENV{ComSpec}" /c "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cvt83.cmd" "${ANDROID_SYSROOT}" - OUTPUT_VARIABLE __path OUTPUT_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE __result ERROR_QUIET ) - if( __result EQUAL 0 ) - file( TO_CMAKE_PATH "${__path}" ANDROID_SYSROOT ) - set( ANDROID_CXX_FLAGS "--sysroot=${ANDROID_SYSROOT}" ) - else() - set( ANDROID_CXX_FLAGS "--sysroot=\"${ANDROID_SYSROOT}\"" ) - endif() - else() - set( ANDROID_CXX_FLAGS "'--sysroot=${ANDROID_SYSROOT}'" ) - endif() - if( NOT _CMAKE_IN_TRY_COMPILE ) - # quotes can break try_compile and compiler identification - message(WARNING "Path to your Android NDK (or toolchain) has non-alphanumeric symbols.\nThe build might be broken.\n") - endif() -else() - set( ANDROID_CXX_FLAGS "--sysroot=${ANDROID_SYSROOT}" ) -endif() - -# NDK flags -if( ARMEABI OR ARMEABI_V7A ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fpic -funwind-tables" ) - if( NOT ANDROID_FORCE_ARM_BUILD AND NOT ARMEABI_V6 ) - set( ANDROID_CXX_FLAGS_RELEASE "-mthumb -fomit-frame-pointer -fno-strict-aliasing" ) - set( ANDROID_CXX_FLAGS_DEBUG "-marm -fno-omit-frame-pointer -fno-strict-aliasing" ) - if( NOT ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -finline-limit=64" ) - endif() - else() - # always compile ARMEABI_V6 in arm mode; otherwise there is no difference from ARMEABI - set( ANDROID_CXX_FLAGS_RELEASE "-marm -fomit-frame-pointer -fstrict-aliasing" ) - set( ANDROID_CXX_FLAGS_DEBUG "-marm -fno-omit-frame-pointer -fno-strict-aliasing" ) - if( NOT ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" ) - endif() - endif() -elseif( X86 ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funwind-tables" ) - if( NOT ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -funswitch-loops -finline-limit=300" ) - else() - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fPIC" ) - endif() - set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer -fstrict-aliasing" ) - set( ANDROID_CXX_FLAGS_DEBUG "-fno-omit-frame-pointer -fno-strict-aliasing" ) -elseif( MIPS ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fpic -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0" ) - set( ANDROID_CXX_FLAGS_RELEASE "-fomit-frame-pointer" ) - set( ANDROID_CXX_FLAGS_DEBUG "-fno-omit-frame-pointer" ) - if( NOT ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers" ) - set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} -funswitch-loops -finline-limit=300" ) - endif() -elseif() - set( ANDROID_CXX_FLAGS_RELEASE "" ) - set( ANDROID_CXX_FLAGS_DEBUG "" ) -endif() - -set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fsigned-char" ) # good/necessary when porting desktop libraries - -if( NOT X86 AND NOT ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "-Wno-psabi ${ANDROID_CXX_FLAGS}" ) -endif() - -if( NOT ANDROID_COMPILER_VERSION VERSION_LESS "4.6" ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -no-canonical-prefixes" ) # see https://android-review.googlesource.com/#/c/47564/ -endif() - -# ABI-specific flags -if( ARMEABI_V7A ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv7-a -mfloat-abi=softfp" ) - if( NEON ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=neon" ) - elseif( VFPV3 ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=vfpv3" ) - else() - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -mfpu=vfpv3-d16" ) - endif() -elseif( ARMEABI_V6 ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv6 -mfloat-abi=softfp -mfpu=vfp" ) # vfp == vfpv2 -elseif( ARMEABI ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -march=armv5te -mtune=xscale -msoft-float" ) -endif() - -if( ANDROID_STL MATCHES "gnustl" AND (EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}") ) - set( CMAKE_CXX_CREATE_SHARED_LIBRARY " -o " ) - set( CMAKE_CXX_CREATE_SHARED_MODULE " -o " ) - set( CMAKE_CXX_LINK_EXECUTABLE " -o " ) -else() - set( CMAKE_CXX_CREATE_SHARED_LIBRARY " -o " ) - set( CMAKE_CXX_CREATE_SHARED_MODULE " -o " ) - set( CMAKE_CXX_LINK_EXECUTABLE " -o " ) -endif() - -# STL -if( EXISTS "${__libstl}" OR EXISTS "${__libsupcxx}" ) - if( EXISTS "${__libstl}" ) - set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${__libstl}\"" ) - set( CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${__libstl}\"" ) - set( CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libstl}\"" ) - endif() - if( EXISTS "${__libsupcxx}" ) - set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${__libsupcxx}\"" ) - set( CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${__libsupcxx}\"" ) - set( CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} \"${__libsupcxx}\"" ) - # C objects: - set( CMAKE_C_CREATE_SHARED_LIBRARY " -o " ) - set( CMAKE_C_CREATE_SHARED_MODULE " -o " ) - set( CMAKE_C_LINK_EXECUTABLE " -o " ) - set( CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_C_CREATE_SHARED_LIBRARY} \"${__libsupcxx}\"" ) - set( CMAKE_C_CREATE_SHARED_MODULE "${CMAKE_C_CREATE_SHARED_MODULE} \"${__libsupcxx}\"" ) - set( CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE} \"${__libsupcxx}\"" ) - endif() - if( ANDROID_STL MATCHES "gnustl" ) - if( NOT EXISTS "${ANDROID_LIBM_PATH}" ) - set( ANDROID_LIBM_PATH -lm ) - endif() - set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} ${ANDROID_LIBM_PATH}" ) - set( CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE} ${ANDROID_LIBM_PATH}" ) - set( CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} ${ANDROID_LIBM_PATH}" ) - endif() -endif() - -# variables controlling optional build flags -if (ANDROID_NDK_RELEASE STRLESS "r7") - # libGLESv2.so in NDK's prior to r7 refers to missing external symbols. - # So this flag option is required for all projects using OpenGL from native. - __INIT_VARIABLE( ANDROID_SO_UNDEFINED VALUES ON ) -else() - __INIT_VARIABLE( ANDROID_SO_UNDEFINED VALUES OFF ) -endif() -__INIT_VARIABLE( ANDROID_NO_UNDEFINED OBSOLETE_NO_UNDEFINED VALUES ON ) -__INIT_VARIABLE( ANDROID_FUNCTION_LEVEL_LINKING VALUES ON ) -__INIT_VARIABLE( ANDROID_GOLD_LINKER VALUES ON ) -__INIT_VARIABLE( ANDROID_NOEXECSTACK VALUES ON ) -__INIT_VARIABLE( ANDROID_RELRO VALUES ON ) - -set( ANDROID_NO_UNDEFINED ${ANDROID_NO_UNDEFINED} CACHE BOOL "Show all undefined symbols as linker errors" ) -set( ANDROID_SO_UNDEFINED ${ANDROID_SO_UNDEFINED} CACHE BOOL "Allows or disallows undefined symbols in shared libraries" ) -set( ANDROID_FUNCTION_LEVEL_LINKING ${ANDROID_FUNCTION_LEVEL_LINKING} CACHE BOOL "Allows or disallows undefined symbols in shared libraries" ) -set( ANDROID_GOLD_LINKER ${ANDROID_GOLD_LINKER} CACHE BOOL "Enables gold linker (only available for NDK r8b for ARM and x86 architectures on linux-86 and darwin-x86 hosts)" ) -set( ANDROID_NOEXECSTACK ${ANDROID_NOEXECSTACK} CACHE BOOL "Allows or disallows undefined symbols in shared libraries" ) -set( ANDROID_RELRO ${ANDROID_RELRO} CACHE BOOL "Enables RELRO - a memory corruption mitigation technique" ) -mark_as_advanced( ANDROID_NO_UNDEFINED ANDROID_SO_UNDEFINED ANDROID_FUNCTION_LEVEL_LINKING ANDROID_GOLD_LINKER ANDROID_NOEXECSTACK ANDROID_RELRO ) - -# linker flags -set( ANDROID_LINKER_FLAGS "" ) - -if( ARMEABI_V7A ) - # this is *required* to use the following linker flags that routes around - # a CPU bug in some Cortex-A8 implementations: - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--fix-cortex-a8" ) -endif() - -if( ANDROID_NO_UNDEFINED ) - if( MIPS ) - # there is some sysroot-related problem in mips linker... - if( NOT ANDROID_SYSROOT MATCHES "[ ;\"]" ) - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--no-undefined -Wl,-rpath-link,${ANDROID_SYSROOT}/usr/lib" ) - endif() - else() - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--no-undefined" ) - endif() -endif() - -if( ANDROID_SO_UNDEFINED ) - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,-allow-shlib-undefined" ) -endif() - -if( ANDROID_FUNCTION_LEVEL_LINKING ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -fdata-sections -ffunction-sections" ) - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,--gc-sections" ) -endif() - -if( ANDROID_COMPILER_VERSION VERSION_EQUAL "4.6" ) - if( ANDROID_GOLD_LINKER AND (CMAKE_HOST_UNIX OR ANDROID_NDK_RELEASE STRGREATER "r8b") AND (ARMEABI OR ARMEABI_V7A OR X86) ) - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=gold" ) - elseif( ANDROID_NDK_RELEASE STRGREATER "r8b") - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -fuse-ld=bfd" ) - elseif( ANDROID_NDK_RELEASE STREQUAL "r8b" AND ARMEABI AND NOT _CMAKE_IN_TRY_COMPILE ) - message( WARNING "The default bfd linker from arm GCC 4.6 toolchain can fail with 'unresolvable R_ARM_THM_CALL relocation' error message. See https://code.google.com/p/android/issues/detail?id=35342 - On Linux and OS X host platform you can workaround this problem using gold linker (default). - Rerun cmake with -DANDROID_GOLD_LINKER=ON option in case of problems. -" ) - endif() -endif() # version 4.6 - -if( ANDROID_NOEXECSTACK ) - if( ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -Xclang -mnoexecstack" ) - else() - set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS} -Wa,--noexecstack" ) - endif() - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,-z,noexecstack" ) -endif() - -if( ANDROID_RELRO ) - set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now" ) -endif() - -if( ANDROID_COMPILER_IS_CLANG ) - set( ANDROID_CXX_FLAGS "-Qunused-arguments ${ANDROID_CXX_FLAGS}" ) - if( ARMEABI_V7A AND NOT ANDROID_FORCE_ARM_BUILD ) - set( ANDROID_CXX_FLAGS_RELEASE "-target thumbv7-none-linux-androideabi ${ANDROID_CXX_FLAGS_RELEASE}" ) - set( ANDROID_CXX_FLAGS_DEBUG "-target ${ANDROID_LLVM_TRIPLE} ${ANDROID_CXX_FLAGS_DEBUG}" ) - else() - set( ANDROID_CXX_FLAGS "-target ${ANDROID_LLVM_TRIPLE} ${ANDROID_CXX_FLAGS}" ) - endif() - if( BUILD_WITH_ANDROID_NDK ) - set( ANDROID_CXX_FLAGS "-gcc-toolchain ${ANDROID_TOOLCHAIN_ROOT} ${ANDROID_CXX_FLAGS}" ) - endif() -endif() - -# cache flags -set( CMAKE_CXX_FLAGS "" CACHE STRING "c++ flags" ) -set( CMAKE_C_FLAGS "" CACHE STRING "c flags" ) -set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "c++ Release flags" ) -set( CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "c Release flags" ) -set( CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DDEBUG -D_DEBUG" CACHE STRING "c++ Debug flags" ) -set( CMAKE_C_FLAGS_DEBUG "-O0 -g -DDEBUG -D_DEBUG" CACHE STRING "c Debug flags" ) -set( CMAKE_SHARED_LINKER_FLAGS "" CACHE STRING "shared linker flags" ) -set( CMAKE_MODULE_LINKER_FLAGS "" CACHE STRING "module linker flags" ) -set( CMAKE_EXE_LINKER_FLAGS "-Wl,-z,nocopyreloc" CACHE STRING "executable linker flags" ) - -# put flags to cache (for debug purpose only) -set( ANDROID_CXX_FLAGS "${ANDROID_CXX_FLAGS}" CACHE INTERNAL "Android specific c/c++ flags" ) -set( ANDROID_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE}" CACHE INTERNAL "Android specific c/c++ Release flags" ) -set( ANDROID_CXX_FLAGS_DEBUG "${ANDROID_CXX_FLAGS_DEBUG}" CACHE INTERNAL "Android specific c/c++ Debug flags" ) -set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS}" CACHE INTERNAL "Android specific c/c++ linker flags" ) - -# finish flags -set( CMAKE_CXX_FLAGS "${ANDROID_CXX_FLAGS} ${CMAKE_CXX_FLAGS}" ) -set( CMAKE_C_FLAGS "${ANDROID_CXX_FLAGS} ${CMAKE_C_FLAGS}" ) -set( CMAKE_CXX_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELEASE}" ) -set( CMAKE_C_FLAGS_RELEASE "${ANDROID_CXX_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELEASE}" ) -set( CMAKE_CXX_FLAGS_DEBUG "${ANDROID_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_DEBUG}" ) -set( CMAKE_C_FLAGS_DEBUG "${ANDROID_CXX_FLAGS_DEBUG} ${CMAKE_C_FLAGS_DEBUG}" ) -set( CMAKE_SHARED_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}" ) -set( CMAKE_MODULE_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_MODULE_LINKER_FLAGS}" ) -set( CMAKE_EXE_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}" ) - -if( MIPS AND BUILD_WITH_ANDROID_NDK AND ANDROID_NDK_RELEASE STREQUAL "r8" ) - set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.xsc ${CMAKE_SHARED_LINKER_FLAGS}" ) - set( CMAKE_MODULE_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.xsc ${CMAKE_MODULE_LINKER_FLAGS}" ) - set( CMAKE_EXE_LINKER_FLAGS "-Wl,-T,${ANDROID_NDK_TOOLCHAINS_PATH}/${ANDROID_GCC_TOOLCHAIN_NAME}/mipself.x ${CMAKE_EXE_LINKER_FLAGS}" ) -endif() - -# configure rtti -if( DEFINED ANDROID_RTTI AND ANDROID_STL_FORCE_FEATURES ) - if( ANDROID_RTTI ) - set( CMAKE_CXX_FLAGS "-frtti ${CMAKE_CXX_FLAGS}" ) - else() - set( CMAKE_CXX_FLAGS "-fno-rtti ${CMAKE_CXX_FLAGS}" ) - endif() -endif() - -# configure exceptios -if( DEFINED ANDROID_EXCEPTIONS AND ANDROID_STL_FORCE_FEATURES ) - if( ANDROID_EXCEPTIONS ) - set( CMAKE_CXX_FLAGS "-fexceptions ${CMAKE_CXX_FLAGS}" ) - set( CMAKE_C_FLAGS "-fexceptions ${CMAKE_C_FLAGS}" ) - else() - set( CMAKE_CXX_FLAGS "-fno-exceptions ${CMAKE_CXX_FLAGS}" ) - set( CMAKE_C_FLAGS "-fno-exceptions ${CMAKE_C_FLAGS}" ) - endif() -endif() - -# global includes and link directories -include_directories( SYSTEM "${ANDROID_SYSROOT}/usr/include" ${ANDROID_STL_INCLUDE_DIRS} ) -get_filename_component(__android_install_path "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" ABSOLUTE) # avoid CMP0015 policy warning -link_directories( "${__android_install_path}" ) - -# detect if need link crtbegin_so.o explicitly -if( NOT DEFINED ANDROID_EXPLICIT_CRT_LINK ) - set( __cmd "${CMAKE_CXX_CREATE_SHARED_LIBRARY}" ) - string( REPLACE "" "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" __cmd "${__cmd}" ) - string( REPLACE "" "${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}" __cmd "${__cmd}" ) - string( REPLACE "" "${CMAKE_CXX_FLAGS}" __cmd "${__cmd}" ) - string( REPLACE "" "" __cmd "${__cmd}" ) - string( REPLACE "" "${CMAKE_SHARED_LINKER_FLAGS}" __cmd "${__cmd}" ) - string( REPLACE "" "-shared" __cmd "${__cmd}" ) - string( REPLACE "" "" __cmd "${__cmd}" ) - string( REPLACE "" "" __cmd "${__cmd}" ) - string( REPLACE "" "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/toolchain_crtlink_test.so" __cmd "${__cmd}" ) - string( REPLACE "" "\"${ANDROID_SYSROOT}/usr/lib/crtbegin_so.o\"" __cmd "${__cmd}" ) - string( REPLACE "" "" __cmd "${__cmd}" ) - separate_arguments( __cmd ) - foreach( __var ANDROID_NDK ANDROID_NDK_TOOLCHAINS_PATH ANDROID_STANDALONE_TOOLCHAIN ) - if( ${__var} ) - set( __tmp "${${__var}}" ) - separate_arguments( __tmp ) - string( REPLACE "${__tmp}" "${${__var}}" __cmd "${__cmd}") - endif() - endforeach() - string( REPLACE "'" "" __cmd "${__cmd}" ) - string( REPLACE "\"" "" __cmd "${__cmd}" ) - execute_process( COMMAND ${__cmd} RESULT_VARIABLE __cmd_result OUTPUT_QUIET ERROR_QUIET ) - if( __cmd_result EQUAL 0 ) - set( ANDROID_EXPLICIT_CRT_LINK ON ) - else() - set( ANDROID_EXPLICIT_CRT_LINK OFF ) - endif() -endif() - -if( ANDROID_EXPLICIT_CRT_LINK ) - set( CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} \"${ANDROID_SYSROOT}/usr/lib/crtbegin_so.o\"" ) - set( CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE} \"${ANDROID_SYSROOT}/usr/lib/crtbegin_so.o\"" ) -endif() - -# setup output directories -set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_BINARY_DIR} CACHE PATH "root for library output, set this to change where android libs are installed to" ) -set( CMAKE_INSTALL_PREFIX "${ANDROID_TOOLCHAIN_ROOT}/user" CACHE STRING "path for installing" ) - -if(NOT _CMAKE_IN_TRY_COMPILE) - if( EXISTS "${CMAKE_SOURCE_DIR}/jni/CMakeLists.txt" ) - set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_ABI_NAME}" CACHE PATH "Output directory for applications" ) - else() - set( EXECUTABLE_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/bin" CACHE PATH "Output directory for applications" ) - endif() - set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}" CACHE PATH "path for android libs" ) -endif() - -# copy shaed stl library to build directory -if( NOT _CMAKE_IN_TRY_COMPILE AND __libstl MATCHES "[.]so$" ) - get_filename_component( __libstlname "${__libstl}" NAME ) - execute_process( COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${__libstl}" "${LIBRARY_OUTPUT_PATH}/${__libstlname}" RESULT_VARIABLE __fileCopyProcess ) - if( NOT __fileCopyProcess EQUAL 0 OR NOT EXISTS "${LIBRARY_OUTPUT_PATH}/${__libstlname}") - message( SEND_ERROR "Failed copying of ${__libstl} to the ${LIBRARY_OUTPUT_PATH}/${__libstlname}" ) - endif() - unset( __fileCopyProcess ) - unset( __libstlname ) -endif() - - -# set these global flags for cmake client scripts to change behavior -set( ANDROID True ) -set( BUILD_ANDROID True ) - -# where is the target environment -set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" ) - -# only search for libraries and includes in the ndk toolchain -set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) -set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) -set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) - - -# macro to find packages on the host OS -macro( find_host_package ) - set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) - set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER ) - set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER ) - if( CMAKE_HOST_WIN32 ) - SET( WIN32 1 ) - SET( UNIX ) - elseif( CMAKE_HOST_APPLE ) - SET( APPLE 1 ) - SET( UNIX ) - endif() - find_package( ${ARGN} ) - SET( WIN32 ) - SET( APPLE ) - SET( UNIX 1 ) - set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) - set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) - set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) -endmacro() - - -# macro to find programs on the host OS -macro( find_host_program ) - set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) - set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER ) - set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER ) - if( CMAKE_HOST_WIN32 ) - SET( WIN32 1 ) - SET( UNIX ) - elseif( CMAKE_HOST_APPLE ) - SET( APPLE 1 ) - SET( UNIX ) - endif() - find_program( ${ARGN} ) - SET( WIN32 ) - SET( APPLE ) - SET( UNIX 1 ) - set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY ) - set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) - set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) -endmacro() - - -macro( ANDROID_GET_ABI_RAWNAME TOOLCHAIN_FLAG VAR ) - if( "${TOOLCHAIN_FLAG}" STREQUAL "ARMEABI" ) - set( ${VAR} "armeabi" ) - elseif( "${TOOLCHAIN_FLAG}" STREQUAL "ARMEABI_V7A" ) - set( ${VAR} "armeabi-v7a" ) - elseif( "${TOOLCHAIN_FLAG}" STREQUAL "X86" ) - set( ${VAR} "x86" ) - elseif( "${TOOLCHAIN_FLAG}" STREQUAL "MIPS" ) - set( ${VAR} "mips" ) - else() - set( ${VAR} "unknown" ) - endif() -endmacro() - - -# export toolchain settings for the try_compile() command -if( NOT PROJECT_NAME STREQUAL "CMAKE_TRY_COMPILE" ) - set( __toolchain_config "") - foreach( __var NDK_CCACHE LIBRARY_OUTPUT_PATH_ROOT ANDROID_FORBID_SYGWIN ANDROID_SET_OBSOLETE_VARIABLES - ANDROID_NDK_HOST_X64 - ANDROID_NDK - ANDROID_NDK_LAYOUT - ANDROID_STANDALONE_TOOLCHAIN - ANDROID_TOOLCHAIN_NAME - ANDROID_ABI - ANDROID_NATIVE_API_LEVEL - ANDROID_STL - ANDROID_STL_FORCE_FEATURES - ANDROID_FORCE_ARM_BUILD - ANDROID_NO_UNDEFINED - ANDROID_SO_UNDEFINED - ANDROID_FUNCTION_LEVEL_LINKING - ANDROID_GOLD_LINKER - ANDROID_NOEXECSTACK - ANDROID_RELRO - ANDROID_LIBM_PATH - ANDROID_EXPLICIT_CRT_LINK - ) - if( DEFINED ${__var} ) - if( "${__var}" MATCHES " ") - set( __toolchain_config "${__toolchain_config}set( ${__var} \"${${__var}}\" CACHE INTERNAL \"\" )\n" ) - else() - set( __toolchain_config "${__toolchain_config}set( ${__var} ${${__var}} CACHE INTERNAL \"\" )\n" ) - endif() - endif() - endforeach() - set( ANDROID_TOOLCHAIN_CONFIG_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/android.toolchain.config.cmake" CACHE INTERNAL "" ) - file( WRITE "${ANDROID_TOOLCHAIN_CONFIG_FILE}" "${__toolchain_config}" ) - unset( __toolchain_config ) -endif() - - -# force cmake to produce / instead of \ in build commands for Ninja generator -if( CMAKE_GENERATOR MATCHES "Ninja" AND CMAKE_HOST_WIN32 ) - # it is a bad hack after all - # CMake generates Ninja makefiles with UNIX paths only if it thinks that we are going to build with MinGW - set( CMAKE_COMPILER_IS_MINGW TRUE ) # tell CMake that we are MinGW - set( CMAKE_CROSSCOMPILING TRUE ) # stop recursion - enable_language( C ) - enable_language( CXX ) - # unset( CMAKE_COMPILER_IS_MINGW ) # can't unset because CMake does not convert back-slashes in response files without it - unset( MINGW ) -endif() - - -# set some obsolete variables for backward compatibility -set( ANDROID_SET_OBSOLETE_VARIABLES ON CACHE BOOL "Define obsolete Andrid-specific cmake variables" ) -mark_as_advanced( ANDROID_SET_OBSOLETE_VARIABLES ) -if( ANDROID_SET_OBSOLETE_VARIABLES ) - set( ANDROID_API_LEVEL ${ANDROID_NATIVE_API_LEVEL} ) - set( ARM_TARGET "${ANDROID_ABI}" ) - set( ARMEABI_NDK_NAME "${ANDROID_NDK_ABI_NAME}" ) -endif() - - -# Variables controlling behavior or set by cmake toolchain: -# ANDROID_ABI : "armeabi-v7a" (default), "armeabi", "armeabi-v7a with NEON", "armeabi-v7a with VFPV3", "armeabi-v6 with VFP", "x86", "mips" -# ANDROID_NATIVE_API_LEVEL : 3,4,5,8,9,14 (depends on NDK version) -# ANDROID_STL : gnustl_static/gnustl_shared/stlport_static/stlport_shared/gabi++_static/gabi++_shared/system_re/system/none -# ANDROID_FORBID_SYGWIN : ON/OFF -# ANDROID_NO_UNDEFINED : ON/OFF -# ANDROID_SO_UNDEFINED : OFF/ON (default depends on NDK version) -# ANDROID_FUNCTION_LEVEL_LINKING : ON/OFF -# ANDROID_GOLD_LINKER : ON/OFF -# ANDROID_NOEXECSTACK : ON/OFF -# ANDROID_RELRO : ON/OFF -# ANDROID_FORCE_ARM_BUILD : ON/OFF -# ANDROID_STL_FORCE_FEATURES : ON/OFF -# ANDROID_SET_OBSOLETE_VARIABLES : ON/OFF -# Can be set only at the first run: -# ANDROID_NDK -# ANDROID_STANDALONE_TOOLCHAIN -# ANDROID_TOOLCHAIN_NAME : the NDK name of compiler toolchain -# ANDROID_NDK_HOST_X64 : try to use x86_64 toolchain (default for x64 host systems) -# ANDROID_NDK_LAYOUT : the inner NDK structure (RELEASE, LINARO, ANDROID) -# LIBRARY_OUTPUT_PATH_ROOT : -# NDK_CCACHE : -# Obsolete: -# ANDROID_API_LEVEL : superseded by ANDROID_NATIVE_API_LEVEL -# ARM_TARGET : superseded by ANDROID_ABI -# ARM_TARGETS : superseded by ANDROID_ABI (can be set only) -# ANDROID_NDK_TOOLCHAIN_ROOT : superseded by ANDROID_STANDALONE_TOOLCHAIN (can be set only) -# ANDROID_USE_STLPORT : superseded by ANDROID_STL=stlport_static -# ANDROID_LEVEL : superseded by ANDROID_NATIVE_API_LEVEL (completely removed) -# -# Primary read-only variables: -# ANDROID : always TRUE -# ARMEABI : TRUE for arm v6 and older devices -# ARMEABI_V6 : TRUE for arm v6 -# ARMEABI_V7A : TRUE for arm v7a -# NEON : TRUE if NEON unit is enabled -# VFPV3 : TRUE if VFP version 3 is enabled -# X86 : TRUE if configured for x86 -# MIPS : TRUE if configured for mips -# BUILD_ANDROID : always TRUE -# BUILD_WITH_ANDROID_NDK : TRUE if NDK is used -# BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used -# ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform -# ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86" or "mips" depending on ANDROID_ABI -# ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c, r9d; set only for NDK -# ANDROID_ARCH_NAME : "arm" or "x86" or "mips" depending on ANDROID_ABI -# ANDROID_SYSROOT : path to the compiler sysroot -# TOOL_OS_SUFFIX : "" or ".exe" depending on host platform -# ANDROID_COMPILER_IS_CLANG : TRUE if clang compiler is used -# Obsolete: -# ARMEABI_NDK_NAME : superseded by ANDROID_NDK_ABI_NAME -# -# Secondary (less stable) read-only variables: -# ANDROID_COMPILER_VERSION : GCC version used -# ANDROID_CXX_FLAGS : C/C++ compiler flags required by Android platform -# ANDROID_SUPPORTED_ABIS : list of currently allowed values for ANDROID_ABI -# ANDROID_TOOLCHAIN_MACHINE_NAME : "arm-linux-androideabi", "arm-eabi" or "i686-android-linux" -# ANDROID_TOOLCHAIN_ROOT : path to the top level of toolchain (standalone or placed inside NDK) -# ANDROID_CLANG_TOOLCHAIN_ROOT : path to clang tools -# ANDROID_SUPPORTED_NATIVE_API_LEVELS : list of native API levels found inside NDK -# ANDROID_STL_INCLUDE_DIRS : stl include paths -# ANDROID_RTTI : if rtti is enabled by the runtime -# ANDROID_EXCEPTIONS : if exceptions are enabled by the runtime -# ANDROID_GCC_TOOLCHAIN_NAME : read-only, differs from ANDROID_TOOLCHAIN_NAME only if clang is used -# ANDROID_CLANG_VERSION : version of clang compiler if clang is used -# ANDROID_LIBM_PATH : path to libm.so (set to something like $(TOP)/out/target/product//obj/lib/libm.so) to workaround unresolved `sincos` -# -# Defaults: -# ANDROID_DEFAULT_NDK_API_LEVEL -# ANDROID_DEFAULT_NDK_API_LEVEL_${ARCH} -# ANDROID_NDK_SEARCH_PATHS -# ANDROID_STANDALONE_TOOLCHAIN_SEARCH_PATH -# ANDROID_SUPPORTED_ABIS_${ARCH} -# ANDROID_SUPPORTED_NDK_VERSIONS diff --git a/CMake/dcmtkAfterModules.cmake b/CMake/dcmtkAfterModules.cmake index d2e4aee6..da7b4877 100644 --- a/CMake/dcmtkAfterModules.cmake +++ b/CMake/dcmtkAfterModules.cmake @@ -21,7 +21,7 @@ IF(BUILD_SINGLE_SHARED_LIBRARY) INSTALL(TARGETS dcmtk EXPORT DCMTKTargets COMPONENT lib - RUNTIME DESTINATION ${DCMTK_INSTALL_BINDIR} - LIBRARY DESTINATION ${DCMTK_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${DCMTK_INSTALL_LIBDIR}) + RUNTIME DESTINATION "${DCMTK_INSTALL_BINDIR}" + LIBRARY DESTINATION "${DCMTK_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${DCMTK_INSTALL_LIBDIR}") ENDIF(BUILD_SINGLE_SHARED_LIBRARY) diff --git a/CMake/dcmtkMacros.cmake b/CMake/dcmtkMacros.cmake index a14d1a81..2ce1ff1f 100644 --- a/CMake/dcmtkMacros.cmake +++ b/CMake/dcmtkMacros.cmake @@ -1,43 +1,43 @@ # # Register all tests for the current module # -# DCMTK_ADD_TESTS - macro which registers all tests +# DCMTK_ADD_TESTS - function which registers all tests for a module # MODULE - name of the module that we are called for # -MACRO(DCMTK_ADD_TESTS MODULE) - IF(CMAKE_CROSSCOMPILING) - IF(WIN32) - WINE_COMMAND(${MODULE}_TEST_CMD "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MODULE}_tests") - STRING(REPLACE "\\" "\\\\" ${MODULE}_TEST_CMD "${${MODULE}_TEST_CMD}") - ELSEIF(ANDROID) - SET(${MODULE}_TEST_CMD -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkCTestRunAndroid.cmake) - ELSE() - IF(NOT DEFINED DCMTK_UNIT_TESTS_UNSUPPORTED_WARN_ONCE) - SET(DCMTK_UNIT_TESTS_UNSUPPORTED_WARN_ONCE CACHE INTERNAL "") - MESSAGE(WARNING "Emulation for your target platform is not available, unit tests will fail!") +FUNCTION(DCMTK_ADD_TESTS MODULE) + IF(BUILD_APPS AND DCMTK_RUN_CTEST_SCRIPT) + SET(TEST_EXECUTABLE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MODULE}_tests${CMAKE_EXECUTABLE_SUFFIX}") + IF(CMAKE_CROSSCOMPILING) + IF(WIN32) + WINE_COMMAND(TEST_COMMAND "${TEST_EXECUTABLE}") + STRING(REPLACE "\\" "\\\\" TEST_COMMAND "${TEST_COMMAND}") + ELSEIF(ANDROID) + SET(TEST_COMMAND "${ANDROID_TEMPORARY_FILES_LOCATION}/${MODULE}_tests") + ELSE() + # not reachable, handled by not defining DCMTK_RUN_CTEST_SCRIPT ENDIF() - SET(${MODULE}_TEST_CMD "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MODULE}_tests") - ENDIF() - ELSE(CMAKE_CROSSCOMPILING) - SET(${MODULE}_TEST_CMD "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MODULE}_tests") - ENDIF(CMAKE_CROSSCOMPILING) - LIST(APPEND DCMTK_TEST_EXECUTABLES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MODULE}_tests") - LIST(REMOVE_DUPLICATES DCMTK_TEST_EXECUTABLES) - SET(DCMTK_TEST_EXECUTABLES ${DCMTK_TEST_EXECUTABLES} CACHE INTERNAL "List of executables needed to run the unit tests") - FILE(STRINGS tests.cc AVAIL_TESTS REGEX "OFTEST_REGISTER\\([^)]*\\)") - FOREACH(TEST_LINE ${AVAIL_TESTS}) - # TODO: How can we parse tests.cc in a saner way? - STRING(REGEX MATCH "OFTEST_REGISTER\\([^)]*" TEST "${TEST_LINE}") - STRING(REPLACE "OFTEST_REGISTER(" "" TEST ${TEST}) - # This assumes that test names are globally unique - IF(CMAKE_CROSSCOMPILING AND ANDROID) - ADD_TEST("${TEST}" ${CMAKE_COMMAND} "-DDCMTK_CTEST_TESTCASE_COMMAND=${ANDROID_TEMPORARY_FILES_LOCATION}/${MODULE}_tests\;${TEST}" ${${MODULE}_TEST_CMD}) ELSE() - ADD_TEST("${TEST}" ${${MODULE}_TEST_CMD} "${TEST}") + SET(TEST_COMMAND "${TEST_EXECUTABLE}") ENDIF() - SET_PROPERTY(TEST "${TEST}" PROPERTY LABELS "${MODULE}") - ENDFOREACH(TEST_LINE) -ENDMACRO(DCMTK_ADD_TESTS) + LIST(APPEND DCMTK_TEST_EXECUTABLES "${TEST_EXECUTABLE}") + LIST(REMOVE_DUPLICATES DCMTK_TEST_EXECUTABLES) + SET(DCMTK_TEST_EXECUTABLES ${DCMTK_TEST_EXECUTABLES} CACHE INTERNAL "List of executables needed to run the unit tests") + FILE(STRINGS tests.cc AVAIL_TESTS REGEX "OFTEST_REGISTER\\([^)]*\\)") + FOREACH(TEST_LINE ${AVAIL_TESTS}) + # TODO: How can we parse tests.cc in a saner way? + STRING(REGEX MATCH "OFTEST_REGISTER\\([^)]*" TEST "${TEST_LINE}") + STRING(REPLACE "OFTEST_REGISTER(" "" TEST ${TEST}) + # This assumes that test names are globally unique + ADD_TEST("${TEST}" "${CMAKE_COMMAND}" "-DDCMTK_CTEST_TESTCASE_COMMAND=${TEST_COMMAND}" "-DDCMTK_CTEST_TEST_NAME=${TEST}" "-DDCMTK_CTEST_EXTRA_ARGUMENTS=\$ENV{DCMTK_CTEST_EXTRA_ARGUMENTS}" "-P" "${DCMTK_RUN_CTEST_SCRIPT}") + SET_PROPERTY(TEST "${TEST}" PROPERTY LABELS "${MODULE}") + SET_PROPERTY(TEST "${TEST}" PROPERTY REQUIRED_FILES "${TEST_EXECUTABLE}") + ENDFOREACH(TEST_LINE) + ADD_CUSTOM_TARGET("${MODULE}-test-exhaustive" + COMMAND "${CMAKE_COMMAND}" "-P" "${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestRunExhaustive.cmake" + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" + ) + ENDIF(BUILD_APPS AND DCMTK_RUN_CTEST_SCRIPT) +ENDFUNCTION(DCMTK_ADD_TESTS) # # Setup an executable @@ -92,9 +92,9 @@ MACRO(DCMTK_ADD_LIBRARY LIBRARY) # Declare installation files INSTALL(TARGETS ${LIBRARY}${DCMTK_LIBRARY_SUFFIX} EXPORT DCMTKTargets - RUNTIME DESTINATION ${DCMTK_INSTALL_BINDIR} COMPONENT bin - LIBRARY DESTINATION ${DCMTK_INSTALL_LIBDIR} COMPONENT shlib - ARCHIVE DESTINATION ${DCMTK_INSTALL_LIBDIR} COMPONENT lib) + RUNTIME DESTINATION "${DCMTK_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${DCMTK_INSTALL_LIBDIR}" COMPONENT shlib + ARCHIVE DESTINATION "${DCMTK_INSTALL_LIBDIR}" COMPONENT lib) ENDIF(NOT BUILD_SINGLE_SHARED_LIBRARY) ENDMACRO(DCMTK_ADD_LIBRARY) @@ -167,25 +167,3 @@ ELSE(CMAKE_VERSION VERSION_LESS 3.0) UNSET(${VAR} PARENT_SCOPE) ENDMACRO(DCMTK_UNSET_PARENT_SCOPE) ENDIF(CMAKE_VERSION VERSION_LESS 3.0) - -# C style atexit for CMake -FUNCTION(DCMTK_ATEXIT_DISPATCHER) - # this will be called at every scope change, but CMAKE_PARENT_LIST_FILE will only - # be empty at exit. - IF(NOT CMAKE_PARENT_LIST_FILE) - FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/atexit.cmake "${DCMTK_ATEXIT_HOOK}") - DCMTK_UNSET_CACHE(DCMTK_ATEXIT_HOOK) - INCLUDE(${CMAKE_BINARY_DIR}/CMakeTmp/atexit.cmake NO_POLICY_SCOPE) - FILE(REMOVE ${CMAKE_BINARY_DIR}/CMakeTmp/atexit.cmake) - ENDIF() -ENDFUNCTION(DCMTK_ATEXIT_DISPATCHER) - -# Necessary since it's sometimes not correctly cleaned up -DCMTK_UNSET_CACHE(DCMTK_ATEXIT_HOOK) - -MACRO(DCMTK_ATEXIT FUNCTION) - IF(NOT DCMTK_ATEXIT_HOOK) - VARIABLE_WATCH(CMAKE_PARENT_LIST_FILE DCMTK_ATEXIT_DISPATCHER) - ENDIF() - SET(DCMTK_ATEXIT_HOOK "${FUNCTION}(${ARGN})" CACHE INTERNAL "") -ENDMACRO(DCMTK_ATEXIT) diff --git a/CMake/dcmtkPrepare.cmake b/CMake/dcmtkPrepare.cmake index 679d6074..2e301003 100644 --- a/CMake/dcmtkPrepare.cmake +++ b/CMake/dcmtkPrepare.cmake @@ -9,9 +9,9 @@ SET(DCMTK_CONFIGURATION_DONE true) # Minimum CMake version required CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -IF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.7.2) - SET(CMAKE_BACKWARDS_COMPATIBILITY 3.7.2 CACHE STRING "Latest version of CMake when this project was released." FORCE) -ENDIF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.7.2) +IF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.8.2) + SET(CMAKE_BACKWARDS_COMPATIBILITY 3.8.2 CACHE STRING "Latest version of CMake when this project was released." FORCE) +ENDIF(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.8.2) # CMAKE_BUILD_TYPE is set to value "Release" if none is specified by the # selected build file generator. For those generators that support multiple @@ -39,14 +39,14 @@ ENDIF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) # a development snapshot and an even number indicates an official release.) SET(DCMTK_MAJOR_VERSION 3) SET(DCMTK_MINOR_VERSION 6) -SET(DCMTK_BUILD_VERSION 1) +SET(DCMTK_BUILD_VERSION 2) # The ABI is not guaranteed to be stable between different snapshots/releases, # so this particular version number is increased for each snapshot or release. -SET(DCMTK_ABI_VERSION 11) +SET(DCMTK_ABI_VERSION 12) # Package "release" settings (some are currently unused and, therefore, disabled) SET(DCMTK_PACKAGE_NAME "dcmtk") -SET(DCMTK_PACKAGE_DATE "DEV") +SET(DCMTK_PACKAGE_DATE "2017-07-14") SET(DCMTK_PACKAGE_VERSION "${DCMTK_MAJOR_VERSION}.${DCMTK_MINOR_VERSION}.${DCMTK_BUILD_VERSION}") SET(DCMTK_PACKAGE_VERSION_NUMBER ${DCMTK_MAJOR_VERSION}${DCMTK_MINOR_VERSION}${DCMTK_BUILD_VERSION}) SET(DCMTK_PACKAGE_VERSION_SUFFIX "") @@ -64,7 +64,15 @@ OPTION(BUILD_SHARED_LIBS "Build with shared libraries." OFF) OPTION(BUILD_SINGLE_SHARED_LIBRARY "Build a single DCMTK library." OFF) MARK_AS_ADVANCED(BUILD_SINGLE_SHARED_LIBRARY) SET(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Library postfix for debug builds. Usually left blank.") -SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/${DCMTK_CMAKE_INCLUDE}/CMake/") +# add our CMake modules to the module path, but prefer the ones from CMake. +LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_ROOT}/Modules" "${CMAKE_CURRENT_SOURCE_DIR}/${DCMTK_CMAKE_INCLUDE}/CMake/") +# newer CMake versions will warn if a module exists in its and the project's module paths, which is now always +# the case since above line adds CMake's module path to the project's one. It, therefore, doesn't matter whether +# we set the policy to OLD or NEW, since in both cases CMake's own module will be preferred. We just set +# the policy to silence the warning. +IF(POLICY CMP0017) + CMAKE_POLICY(SET CMP0017 NEW) +ENDIF() IF(BUILD_SINGLE_SHARED_LIBRARY) # When we are building a single shared lib, we are building shared libs :-) SET(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE) @@ -88,6 +96,27 @@ OPTION(DCMTK_WITH_DOXYGEN "Build API documentation with DOXYGEN." ON) OPTION(DCMTK_GENERATE_DOXYGEN_TAGFILE "Generate a tag file with DOXYGEN." OFF) OPTION(DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS "Build with wide char file I/O functions." OFF) OPTION(DCMTK_WIDE_CHAR_MAIN_FUNCTION "Build command line tools with wide char main function." OFF) +OPTION(DCMTK_ENABLE_STL "Enable use of native STL classes and algorithms instead of DCMTK's own implementations." OFF) +OPTION(DCMTK_ENABLE_CXX11 "Enable use of native C++11 features (eg. move semantics)." OFF) + +MACRO(DCMTK_INFERABLE_OPTION OPTION DESCRIPTION) + SET("${OPTION}" INFERRED CACHE STRING "${DESCRIPTION}") + SET_PROPERTY(CACHE "${OPTION}" PROPERTY STRINGS "INFERRED" "ON" "OFF") + # currently, all inferable options are advanced options + MARK_AS_ADVANCED("${OPTION}") +ENDMACRO(DCMTK_INFERABLE_OPTION) + +DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_VECTOR "Enable use of STL vector.") +DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_ALGORITHM "Enable use of STL algorithm.") +DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_LIMITS "Enable use of STL limit.") +DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_LIST "Enable use of STL list.") +DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_MAP "Enable use of STL map.") +DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_MEMORY "Enable use of STL memory.") +DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_STACK "Enable use of STL stack.") +DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_STRING "Enable use of STL string.") +DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_TYPE_TRAITS "Enable use of STL type traits.") +DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_TUPLE "Enable use of STL tuple.") +DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_SYSTEM_ERROR "Enable use of STL system_error.") # Built-in (compiled-in) dictionary enabled on Windows per default, otherwise # disabled. Loading of external dictionary via run-time is, per default, @@ -124,22 +153,12 @@ ENABLE_TESTING() IF(CMAKE_CROSSCOMPILING) IF(WIN32) - INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseWine.cmake) + INCLUDE("${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseWine.cmake") DCMTK_SETUP_WINE() ELSEIF(ANDROID) - SET(DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS "-DANDROID_TOOLCHAIN_CONFIG_FILE:INTERNAL=${ANDROID_TOOLCHAIN_CONFIG_FILE}") - INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake) - IF(NOT DCMTK_ANDROID_TOOLCHAIN_VERIFIED) - # Ensure the configuration variables for the Android device emulator exist in the cache. - DCMTK_SETUP_ANDROID_EMULATOR() - SET(DCMTK_ANDROID_TOOLCHAIN_VERIFIED TRUE CACHE INTERNAL "Set to TRUE to prevent aborting configuration on first Android toolchain run") - MESSAGE(FATAL_ERROR - "Please verify your Android toolchain configuration (e.g.\"ANDROID_NATIVE_API_LEVEL\") is correct before configuring DCMTK.\n" - "Hit \"Configure\" again to resume configuration when you are done.\n" - "NOTE: set \"DCMTK_ANDROID_TOOLCHAIN_VERIFIED\" to \"TRUE\" to avoid this check (e.g. to allow automated builds), you may use" - "something like\n \"cmake -DDCMTK_ANDROID_TOOLCHAIN_VERIFIED=TRUE ...\"\nto achieve that." - ) - ENDIF() + INCLUDE("${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake") + # Ensure the configuration variables for the Android device emulator exist in the cache. + DCMTK_SETUP_ANDROID_EMULATOR() ENDIF() ENDIF(CMAKE_CROSSCOMPILING) @@ -147,7 +166,7 @@ ENDIF(CMAKE_CROSSCOMPILING) # Generic utilities used for configuring DCMTK #----------------------------------------------------------------------------- -INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkMacros.cmake) +INCLUDE("${DCMTK_CMAKE_INCLUDE}CMake/dcmtkMacros.cmake") #----------------------------------------------------------------------------- # Prepare external dependencies for cross compiling @@ -159,7 +178,6 @@ IF(CMAKE_CROSSCOMPILING) IF(ANDROID) UNSET(DCMTK_TRY_RUN_ANDROID_RUNTIME_INSTALLED CACHE) DCMTK_ANDROID_START_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE) - DCMTK_ATEXIT(DCMTK_ANDROID_STOP_EMULATOR DCMTK_ANDROID_EMULATOR_INSTANCE) ENDIF() ENDIF(CMAKE_CROSSCOMPILING) @@ -190,12 +208,12 @@ MARK_AS_ADVANCED(DCMTK_INSTALL_BINDIR DCMTK_INSTALL_INCDIR DCMTK_INSTALL_LIBDIR #----------------------------------------------------------------------------- # Build directories #----------------------------------------------------------------------------- -SET(DCMTK_BUILD_CMKDIR ${CMAKE_BINARY_DIR}) +SET(DCMTK_BUILD_CMKDIR "${CMAKE_BINARY_DIR}") #----------------------------------------------------------------------------- # Start with clean DCMTKTargets.cmake, filled in GenerateCMakeExports.cmake #----------------------------------------------------------------------------- -FILE(WRITE ${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake "") +FILE(WRITE "${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake" "") #----------------------------------------------------------------------------- # Platform-independent settings @@ -213,7 +231,14 @@ IF(COMMAND CMAKE_POLICY) ENDIF(COMMAND CMAKE_POLICY) # pass optional build date to compiler -ADD_DEFINITIONS(-DDCMTK_BUILD_DATE=\\\"2017-02-28\\\") +#SET(DCMTK_BUILD_DATE "\\\"YYYY-MM-DD\\\"") +IF(DCMTK_BUILD_DATE) + # Xcode needs one escaping layer more than (as far as we know) everyone else - we gotta go deeper! + IF(CMAKE_GENERATOR MATCHES Xcode) + STRING(REPLACE "\\" "\\\\" DCMTK_BUILD_DATE "${DCMTK_BUILD_DATE}") + ENDIF() + ADD_DEFINITIONS(-DDCMTK_BUILD_DATE=${DCMTK_BUILD_DATE}) +ENDIF(DCMTK_BUILD_DATE) # make OFString(NULL) safe by default ADD_DEFINITIONS(-DUSE_NULL_SAFE_OFSTRING) @@ -350,8 +375,12 @@ ELSE(WIN32) # ... for non-Windows systems IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE") - # FreeBSD and newer versions of OpenBSD fail with these flags - ELSEIF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" OR ${CMAKE_SYSTEM_VERSION} VERSION_LESS 4)) + # Compiler flags for NetBSD + ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_NETBSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_NETBSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L") + # Solaris, FreeBSD and newer versions of OpenBSD fail with these flags + ELSEIF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" OR ${CMAKE_SYSTEM_VERSION} VERSION_LESS 4)) # Compiler flags for all other non-Windows systems SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L") @@ -370,7 +399,7 @@ ENDIF(WIN32) # define libraries and object files that must be linked to most Windows applications IF(WIN32) - SET(WIN32_STD_LIBRARIES ws2_32 netapi32 wsock32) + SET(WIN32_STD_LIBRARIES iphlpapi ws2_32 netapi32 wsock32) IF(NOT DEFINED MINGW) # additional object file needed for wildcard expansion; for wchar_t* support, use 'wsetargv' SET(WIN32_STD_OBJECTS setargv) @@ -386,66 +415,29 @@ ENDIF(WIN32) SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") +# determine which flags are required to enable C++11 features (if any) +IF(NOT DEFINED DCMTK_CXX11_FLAGS) + IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + SET(DCMTK_CXX11_FLAGS "-std=c++11") + ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + IF(CMAKE_HOST_WIN32) + SET(DCMTK_CXX11_FLAGS "/Qstd=c++11") + ELSE() + SET(DCMTK_CXX11_FLAGS "-std=c++11") + ENDIF() + ELSE() + SET(DCMTK_CXX11_FLAGS "") + ENDIF() + SET(DCMTK_CXX11_FLAGS "${DCMTK_CXX11_FLAGS}" CACHE STRING "The flags to add to CMAKE_CXX_FLAGS for enabling C++11 (if any).") + MARK_AS_ADVANCED(DCMTK_CXX11_FLAGS) +ENDIF(NOT DEFINED DCMTK_CXX11_FLAGS) + #----------------------------------------------------------------------------- # Third party libraries #----------------------------------------------------------------------------- INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/3rdparty.cmake) -#----------------------------------------------------------------------------- -# C++11 support -#----------------------------------------------------------------------------- - -MACRO(GET_CXX_VERSION VERSION) - EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE ${VERSION}) - STRING(REGEX REPLACE "^.*[ ]([0-9]\\.[0-9]\\.[0-9]).*$" "\\1" ${VERSION} "${${VERSION}}") -ENDMACRO(GET_CXX_VERSION VERSION) - -MACRO(ALLOW_CXX11_SUPPORT FLAGS) - IF(NOT DCMTK_CXX11_FLAGS) - SET(DCMTK_CXX11_FLAGS ${FLAGS} CACHE STRING "Flags used to enable C++11 support.") - ENDIF() - IF(DCMTK_USE_CXX11_STL) - MESSAGE(STATUS "Info: Configured DCMTK to use native C++11 features.") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DCMTK_CXX11_FLAGS}") - SET(DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS ${DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS} "-DCMAKE_CXX_FLAGS:STRING=${DCMTK_CXX11_FLAGS}") - ELSE() - MESSAGE(STATUS "Info: Your compiler supports C++11. You may enable C++11 features via \"DCMTK_USE_CXX11_STL\" to create a C++11 build of DCMTK.") - SET(DCMTK_USE_CXX11_STL OFF CACHE BOOL "Enable or disable C++11 while building DCMTK.") - ENDIF() -ENDMACRO(ALLOW_CXX11_SUPPORT) - -MACRO(DENY_CXX11_SUPPORT) - IF(DCMTK_USE_CXX11_STL) - IF(DCMTK_CXX11_FLAGS AND NOT DCMTK_CXX11_FLAGS STREQUAL "unknown") - MESSAGE(STATUS "Info: Enabling C++11 support with custom flags \"${DCMTK_CXX11_FLAGS}\" for a potentially unsupported compiler.") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DCMTK_CXX11_FLAGS}") - SET(DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS ${DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS} "-DCMAKE_CXX_FLAGS:STRING=${DCMTK_CXX11_FLAGS}") - ELSE() - MESSAGE(WARNING "DCMTK has been configured to use the C++11 STL, but the compiler does not seem to support C++11. Override this warning by setting DCMTK_CXX11_FLAGS to tell DCMTK how to enable C++11 support for your compiler.") - SET(DCMTK_CXX11_FLAGS "unknown" CACHE STRING "Flags used to enable C++11 support.") - ENDIF() - ENDIF() -ENDMACRO(DENY_CXX11_SUPPORT) - -IF(CMAKE_COMPILER_IS_GNUCXX) - GET_CXX_VERSION(GXX_VERSION) - IF(GXX_VERSION VERSION_GREATER 4.8.1 OR GXX_VERSION VERSION_EQUAL 4.8.1) - ALLOW_CXX11_SUPPORT("-std=c++11") - ELSE() - DENY_CXX11_SUPPORT() - ENDIF() -ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - GET_CXX_VERSION(CLANG_VERSION) - IF(CLANG_VERSION VERSION_GREATER 3.3 OR CLANG_VERSION VERSION_EQUAL 3.3) - ALLOW_CXX11_SUPPORT("-std=c++11") - ELSE() - DENY_CXX11_SUPPORT() - ENDIF() -ELSE() - DENY_CXX11_SUPPORT() -ENDIF() - #----------------------------------------------------------------------------- # DCMTK libraries #----------------------------------------------------------------------------- @@ -491,3 +483,32 @@ IF(WITH_THREADS) ENDIF(HAVE_LIBRT) ENDIF(HAVE_PTHREAD_H) ENDIF(WITH_THREADS) + +#----------------------------------------------------------------------------- +# Test for socket libraries if needed (Solaris) +#----------------------------------------------------------------------------- + +SET(SOCKET_LIBS) + +FUNCTION(DCMTK_TEST_SOCKET_LIBRARY NAME SYMBOL) + STRING(TOUPPER "${NAME}" VARNAME) + CHECK_LIBRARY_EXISTS("${NAME}" "main" "" "HAVE_LIB${VARNAME}_MAIN") + IF(NOT HAVE_LIB${VARNAME}_MAIN) + CHECK_LIBRARY_EXISTS("${NAME}" "${SYMBOL}" "" "HAVE_LIB${VARNAME}") + ENDIF(NOT HAVE_LIB${VARNAME}_MAIN) + IF(HAVE_LIB${VARNAME} OR HAVE_LIB${VARNAME}_MAIN) + LIST(APPEND SOCKET_LIBS "${NAME}") + SET(SOCKET_LIBS "${SOCKET_LIBS}" PARENT_SCOPE) + ENDIF(HAVE_LIB${VARNAME} OR HAVE_LIB${VARNAME}_MAIN) +ENDFUNCTION(DCMTK_TEST_SOCKET_LIBRARY) + +DCMTK_TEST_SOCKET_LIBRARY(nsl "gethostbyname") +DCMTK_TEST_SOCKET_LIBRARY(socket "socket") + +#----------------------------------------------------------------------------- +# Test if SunPro compiler and add features +#----------------------------------------------------------------------------- + +IF(CMAKE_CXX_COMPILER_ID STREQUAL SunPro) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -features=tmplrefstatic") +ENDIF() diff --git a/CMake/dcmtkTryCompile.cmake b/CMake/dcmtkTryCompile.cmake index 102864d2..0010b0b6 100644 --- a/CMake/dcmtkTryCompile.cmake +++ b/CMake/dcmtkTryCompile.cmake @@ -21,21 +21,21 @@ MACRO(DCMTK_TRY_COMPILE VAR MESSAGE SOURCE) DCMTK_UNSET(DCMTK_TRY_COMPILE_CMAKE_FLAGS) ENDIF() TRY_COMPILE(${VAR} - ${CMAKE_BINARY_DIR} - ${DCMTK_TRY_COMPILE_FILE} + "${CMAKE_BINARY_DIR}" + "${DCMTK_TRY_COMPILE_FILE}" ${DCMTK_TRY_COMPILE_CMAKE_FLAGS} OUTPUT_VARIABLE OUTPUT ${ARGN}) IF(${VAR}) MESSAGE(STATUS "Checking whether ${MESSAGE} -- yes") SET(${VAR} 1 CACHE INTERNAL "${MESSAGE}") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log" "${MESSAGE} passed with the following output:\n" "${OUTPUT}\n") ELSE(${VAR}) MESSAGE(STATUS "Checking whether ${MESSAGE} -- no") SET(${VAR} 0 CACHE INTERNAL "${MESSAGE}") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log" "${MESSAGE} failed with the following output:\n" "${OUTPUT}\n") ENDIF(${VAR}) diff --git a/CMake/dcmtkTryRun.cmake b/CMake/dcmtkTryRun.cmake index beba7ef3..3a425f29 100644 --- a/CMake/dcmtkTryRun.cmake +++ b/CMake/dcmtkTryRun.cmake @@ -27,10 +27,10 @@ FUNCTION(DCMTK_TRY_RUN_CROSS RUN_RESULT_VAR COMPILE_RESULT_VAR bindir srcfile) "CMAKE_FLAGS;COMPILE_DEFINITIONS;ARGS" ${ARGN} ) - GET_FILENAME_COMPONENT(OUTPUT_EXECUTABLE_NAME ${srcfile} NAME) - SET(OUTPUT_EXECUTABLE_NAME ${OUTPUT_EXECUTABLE_NAME}${CMAKE_EXECUTABLE_SUFFIX}) - SET(OUTPUT_EXECUTABLE ${bindir}/${OUTPUT_EXECUTABLE_NAME}) - SET(TRY_COMPILE_ARGS ${COMPILE_RESULT_VAR} ${bindir} ${srcfile}) + GET_FILENAME_COMPONENT(OUTPUT_EXECUTABLE_NAME "${srcfile}" NAME) + SET(OUTPUT_EXECUTABLE_NAME "${OUTPUT_EXECUTABLE_NAME}${CMAKE_EXECUTABLE_SUFFIX}") + SET(OUTPUT_EXECUTABLE "${bindir}/${OUTPUT_EXECUTABLE_NAME}") + SET(TRY_COMPILE_ARGS "${COMPILE_RESULT_VAR}" "${bindir}" "${srcfile}") IF(DCMTK_TRY_RUN_CMAKE_FLAGS) LIST(APPEND TRY_COMPILE_ARGS CMAKE_FLAGS ${DCMTK_TRY_RUN_CMAKE_FLAGS} ${DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS}) ELSEIF(DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS) @@ -42,49 +42,42 @@ FUNCTION(DCMTK_TRY_RUN_CROSS RUN_RESULT_VAR COMPILE_RESULT_VAR bindir srcfile) IF(DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE) LIST(APPEND TRY_COMPILE_ARGS OUTPUT_VARIABLE ${DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE}) ENDIF() - TRY_COMPILE(${TRY_COMPILE_ARGS} COPY_FILE ${OUTPUT_EXECUTABLE}) - SET(${COMPILE_RESULT_VAR} ${${COMPILE_RESULT_VAR}} PARENT_SCOPE) + TRY_COMPILE(${TRY_COMPILE_ARGS} COPY_FILE "${OUTPUT_EXECUTABLE}") + SET("${COMPILE_RESULT_VAR}" ${${COMPILE_RESULT_VAR}} PARENT_SCOPE) IF(DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE) - SET(${DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE} ${${DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE}} PARENT_SCOPE) + SET("${DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE}" ${${DCMTK_TRY_RUN_COMPILE_OUTPUT_VARIABLE}} PARENT_SCOPE) ENDIF() IF(${COMPILE_RESULT_VAR}) IF(WIN32) - WINE_COMMAND(CMD ${OUTPUT_EXECUTABLE} ${DCMTK_TRY_RUN_ARGS}) - IF(CMD) - EXECUTE_PROCESS( - COMMAND ${CMD} - RESULT_VARIABLE ${RUN_RESULT_VAR} - OUTPUT_VARIABLE ${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE} - ERROR_VARIABLE ${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE} - ) - ENDIF() + WINE_COMMAND(CMD "${OUTPUT_EXECUTABLE}" ${DCMTK_TRY_RUN_ARGS}) + WINE_DETACHED("${RUN_RESULT_VAR}" "${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}" "${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}" "${WINE_WINE_PROGRAM}" ${CMD}) ELSEIF(ANDROID) DCMTK_ANDROID_WAIT_FOR_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE) IF(NOT DCMTK_TRY_RUN_ANDROID_RUNTIME_INSTALLED) DCMTK_ANDROID_FIND_RUNTIME_LIBRARIES(ANDROID_RUNTIME_LIBRARIES) SET(ANDROID_RUNTIME_LIBRARIES ${ANDROID_RUNTIME_LIBRARIES} CACHE INTERNAL "") - DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE ${ANDROID_RUNTIME_LIBRARIES} DESTINATION ${ANDROID_TEMPORARY_FILES_LOCATION}) + DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE ${ANDROID_RUNTIME_LIBRARIES} DESTINATION "${ANDROID_TEMPORARY_FILES_LOCATION}") SET(DCMTK_TRY_RUN_ANDROID_RUNTIME_INSTALLED TRUE CACHE INTERNAL "") ENDIF() - DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE ${OUTPUT_EXECUTABLE} DESTINATION ${ANDROID_TEMPORARY_FILES_LOCATION}/${OUTPUT_EXECUTABLE_NAME}) + DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE "${OUTPUT_EXECUTABLE}" DESTINATION "${ANDROID_TEMPORARY_FILES_LOCATION}/${OUTPUT_EXECUTABLE_NAME}") DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE - COMMAND chmod 755 ${ANDROID_TEMPORARY_FILES_LOCATION}/${OUTPUT_EXECUTABLE_NAME} + COMMAND chmod 755 "${ANDROID_TEMPORARY_FILES_LOCATION}/${OUTPUT_EXECUTABLE_NAME}" OUTPUT_QUIET ERROR_QUIET ) DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE - COMMAND "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${ANDROID_TEMPORARY_FILES_LOCATION}" ${ANDROID_TEMPORARY_FILES_LOCATION}/${OUTPUT_EXECUTABLE_NAME} ${DCMTK_TRY_RUN_ARGS} - RESULT_VARIABLE ${RUN_RESULT_VAR} - OUTPUT_VARIABLE ${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE} - ERROR_VARIABLE ${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE} + COMMAND "LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${ANDROID_TEMPORARY_FILES_LOCATION}" "${ANDROID_TEMPORARY_FILES_LOCATION}/${OUTPUT_EXECUTABLE_NAME}" ${DCMTK_TRY_RUN_ARGS} + RESULT_VARIABLE "${RUN_RESULT_VAR}" + OUTPUT_VARIABLE "${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}" + ERROR_VARIABLE "${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}" ) ELSE() MESSAGE(WARNING "Emulation for your target platform is not available, please fill in the required configure test results manually.") - TRY_RUN(${RUN_RESULT_VAR} ${COMPILE_RESULT_VAR} ${bindir} ${srcfile} ${ARGN}) + TRY_RUN("${RUN_RESULT_VAR}" "${COMPILE_RESULT_VAR}" "${bindir}" "${srcfile}" ${ARGN}) RETURN() ENDIF() - SET(${RUN_RESULT_VAR} ${${RUN_RESULT_VAR}} PARENT_SCOPE) - SET(${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE} ${${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}} PARENT_SCOPE) + SET("${RUN_RESULT_VAR}" ${${RUN_RESULT_VAR}} PARENT_SCOPE) + SET("${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}" ${${DCMTK_TRY_RUN_RUN_OUTPUT_VARIABLE}} PARENT_SCOPE) ENDIF() ENDFUNCTION(DCMTK_TRY_RUN_CROSS) diff --git a/CMake/dcmtkUseAndroidSDK.cmake b/CMake/dcmtkUseAndroidSDK.cmake index 925423e5..57fab9b1 100644 --- a/CMake/dcmtkUseAndroidSDK.cmake +++ b/CMake/dcmtkUseAndroidSDK.cmake @@ -84,7 +84,7 @@ ENDMACRO(DCMTK_ANDROID_SET_OBJECT_PROPERTIES) # All additional arguments will be ignored. # MACRO(DCMTK_ANDROID_DESTROY_OBJECT VAR) - UNSET(${VAR} CACHE) + UNSET("${VAR}" CACHE) ENDMACRO(DCMTK_ANDROID_DESTROY_OBJECT) # @@ -99,15 +99,15 @@ FUNCTION(DCMTK_ANDROID_FIND_RUNTIME_LIBRARIES VAR) SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so") FOREACH(DIR ${ANDROID_STL_INCLUDE_DIRS}) IF(CMAKE_VERSION VERSION_LESS 2.8.11) - GET_FILENAME_COMPONENT(DIR ${DIR} PATH) + GET_FILENAME_COMPONENT(DIR "${DIR}" PATH) ELSE() - GET_FILENAME_COMPONENT(DIR ${DIR} DIRECTORY) + GET_FILENAME_COMPONENT(DIR "${DIR}" DIRECTORY) ENDIF() - LIST(APPEND ANDROID_STL_LIBRARY_DIRS ${DIR}) + LIST(APPEND ANDROID_STL_LIBRARY_DIRS "${DIR}") ENDFOREACH() FIND_LIBRARY(ANDROID_STL_SHARED_OBJECT ${ANDROID_STL} PATHS ${ANDROID_STL_LIBRARY_DIRS} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) IF(ANDROID_STL_SHARED_OBJECT) - SET(${VAR} ${ANDROID_STL_SHARED_OBJECT} PARENT_SCOPE) + SET("${VAR}" ${ANDROID_STL_SHARED_OBJECT} PARENT_SCOPE) ENDIF() ENDFUNCTION(DCMTK_ANDROID_FIND_RUNTIME_LIBRARIES) @@ -144,7 +144,7 @@ FUNCTION(DCMTK_SETUP_ANDROID_EMULATOR) "or set the missing tools manually!" ) ELSE() - EXECUTE_PROCESS(COMMAND ${ANDROID_ANDROID_PROGRAM} list avd RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_QUIET) + EXECUTE_PROCESS(COMMAND "${ANDROID_ANDROID_PROGRAM}" list avd RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_QUIET) STRING(REGEX MATCHALL "Name:[ \t]*[^\r\n]*" ANDROID_AVAILABLE_AVDS ${OUTPUT}) STRING(REGEX REPLACE "Name:[ \t]*([^\r\n;]*)" "\\1" ANDROID_AVAILABLE_AVDS "${ANDROID_AVAILABLE_AVDS}") SET(ANDROID_EMULATOR_AVD "${ANDROID_EMULATOR_AVD}" CACHE STRING "Android emulator Android Virtual Device (AVD) configuration" FORCE) @@ -169,7 +169,7 @@ FUNCTION(DCMTK_ANDROID_LIST_EMULATORS ONLINE OFFLINE) DCMTK_SETUP_ANDROID_EMULATOR() IF(ANDROID_ADB_PROGRAM) EXECUTE_PROCESS( - COMMAND ${ANDROID_ADB_PROGRAM} devices + COMMAND "${ANDROID_ADB_PROGRAM}" devices RESULT_VARIABLE RESULT OUTPUT_VARIABLE DEVICES_RAW ERROR_QUIET @@ -182,15 +182,15 @@ FUNCTION(DCMTK_ANDROID_LIST_EMULATORS ONLINE OFFLINE) LIST(GET DS 0 EMULATOR_NAME) LIST(GET DS 1 EMULATOR_STATE) IF(EMULATOR_STATE MATCHES "^device$") - LIST(APPEND ${ONLINE} ${EMULATOR_NAME}) + LIST(APPEND "${ONLINE}" ${EMULATOR_NAME}) ELSE() - LIST(APPEND ${OFFLINE} ${EMULATOR_NAME}) + LIST(APPEND "${OFFLINE}" ${EMULATOR_NAME}) ENDIF() ENDIF() ENDFOREACH() ENDIF() - SET(${ONLINE} ${${ONLINE}} PARENT_SCOPE) - SET(${OFFLINE} ${${OFFLINE}} PARENT_SCOPE) + SET("${ONLINE}" ${${ONLINE}} PARENT_SCOPE) + SET("${OFFLINE}" ${${OFFLINE}} PARENT_SCOPE) ENDFUNCTION(DCMTK_ANDROID_LIST_EMULATORS) # @@ -224,16 +224,16 @@ ENDIF(CMAKE_VERSION VERSION_LESS 2.8.11) # FUNCTION(DCMTK_ANDROID_GET_EMULATOR_UUID EMULATOR_NAME VAR) EXECUTE_PROCESS( - COMMAND ${ANDROID_ADB_PROGRAM} -s ${EMULATOR_NAME} shell getprop + COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" shell getprop "ro.emu.uuid" RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_QUIET ) DCMTK_UNSET_PARENT_SCOPE(${VAR}) IF(NOT RESULT) - STRING(REGEX REPLACE ".*\\[emu\\.uuid\\]: \\[([^]]+)\\].*" "\\1" ${VAR} "${OUTPUT}") - IF(${VAR}) - SET(${VAR} ${${VAR}} PARENT_SCOPE) + STRING(STRIP "${OUTPUT}" UUID) + IF(UUID) + SET("${VAR}" ${UUID} PARENT_SCOPE) ENDIF() ENDIF() ENDFUNCTION(DCMTK_ANDROID_GET_EMULATOR_UUID) @@ -252,9 +252,9 @@ ENDFUNCTION(DCMTK_ANDROID_GET_EMULATOR_UUID) FUNCTION(DCMTK_ANDROID_GET_EMULATOR_NAME VAR EMULATOR_UUID) DCMTK_ANDROID_LIST_EMULATORS(ONLINE_EMULATORS OFFLINE_EMULATORS) FOREACH(EMULATOR ${ONLINE_EMULATORS}) - DCMTK_ANDROID_GET_EMULATOR_UUID(${EMULATOR} UUID) + DCMTK_ANDROID_GET_EMULATOR_UUID("${EMULATOR}" UUID) IF(EMULATOR_UUID STREQUAL UUID) - SET(${VAR} ${EMULATOR} PARENT_SCOPE) + SET("${VAR}" "${EMULATOR}" PARENT_SCOPE) RETURN() ENDIF() ENDFOREACH() @@ -262,24 +262,24 @@ FUNCTION(DCMTK_ANDROID_GET_EMULATOR_NAME VAR EMULATOR_UUID) LIST(GET OFFLINE_EMULATORS 0 EMULATOR) LIST(REMOVE_AT OFFLINE_EMULATORS 0) EXECUTE_PROCESS( - COMMAND ${ANDROID_ADB_PROGRAM} -s ${EMULATOR} wait-for-device + COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR}" wait-for-device TIMEOUT 1 RESULT_VARIABLE RESULT OUTPUT_QUIET ERROR_QUIET ) IF(NOT RESULT) - DCMTK_ANDROID_GET_EMULATOR_UUID(${EMULATOR} UUID) + DCMTK_ANDROID_GET_EMULATOR_UUID("${EMULATOR}" UUID) IF(UUID) IF(EMULATOR_UUID STREQUAL UUID) - SET(${VAR} ${EMULATOR} PARENT_SCOPE) + SET("${VAR}" "${EMULATOR}" PARENT_SCOPE) RETURN() ENDIF() ELSE() - LIST(APPEND OFFLINE_EMULATORS ${EMULATOR}) + LIST(APPEND OFFLINE_EMULATORS "${EMULATOR}") ENDIF() ELSE() - LIST(APPEND OFFLINE_EMULATORS ${EMULATOR}) + LIST(APPEND OFFLINE_EMULATORS "${EMULATOR}") ENDIF() ENDWHILE() ENDFUNCTION() @@ -300,11 +300,11 @@ FUNCTION(DCMTK_ANDROID_START_EMULATOR VAR) IF(NOT ANDROID_EMULATOR_AVD) MESSAGE(FATAL_ERROR "Please select which Android emulator Android Virtual Device (AVD) configuration to use!") ELSE() - DCMTK_ANDROID_GET_OBJECT_PROPERTIES(${VAR}) + DCMTK_ANDROID_GET_OBJECT_PROPERTIES("${VAR}") IF(NOT EMULATOR_STATE) DCMTK_ANDROID_EMULATOR_GENERATE_UUID(EMULATOR_UUID) ELSEIF(EMULATOR_STATE STREQUAL "RUNNING") - DCMTK_ANDROID_GET_EMULATOR_UUID(${EMULATOR_NAME} UUID) + DCMTK_ANDROID_GET_EMULATOR_UUID("${EMULATOR_NAME}" UUID) # Do nothing if the running emulator instance is ok and can be reused. # Otherwise restart it. IF(UUID STREQUAL EMULATOR_UUID) @@ -314,19 +314,19 @@ FUNCTION(DCMTK_ANDROID_START_EMULATOR VAR) ELSEIF(EMULATOR_STATE STREQUAL "STARTING") # Is it really starting, or has somebody aborted it? MESSAGE(STATUS "Found previously started Android device emulator, checking if it's still present...") - DCMTK_ANDROID_GET_EMULATOR_NAME(EMULATOR_NAME ${EMULATOR_UUID}) + DCMTK_ANDROID_GET_EMULATOR_NAME(EMULATOR_NAME "${EMULATOR_UUID}") IF(EMULATOR_NAME) MESSAGE(STATUS "Found previously started Android device emulator, checking if it's still present... yes") - DCMTK_ANDROID_SET_OBJECT_PROPERTIES(${VAR} RUNNING ${EMULATOR_UUID} ${EMULATOR_NAME}) + DCMTK_ANDROID_SET_OBJECT_PROPERTIES(${VAR} RUNNING "${EMULATOR_UUID}" "${EMULATOR_NAME}") RETURN() ENDIF() MESSAGE(STATUS "Found previously started Android device emulator, checking if it's still present... no") ENDIF() MESSAGE(STATUS "Starting the Android device emulator...") IF(CMAKE_HOST_SYSTEM MATCHES "Windows.*") - SET(COMMAND sh -c "${ANDROID_EMULATOR_PROGRAM} -avd ${ANDROID_EMULATOR_AVD} -no-boot-anim -noaudio -prop emu.uuid=${EMULATOR_UUID} >/dev/null 2>&1 < /dev/null &") + SET(COMMAND sh -c "${ANDROID_EMULATOR_PROGRAM} -avd ${ANDROID_EMULATOR_AVD} -no-boot-anim -prop ro.emu.uuid=${EMULATOR_UUID} >${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/android-emulator.log 2>&1 < /dev/null &") ELSE() - SET(COMMAND sh -c "${ANDROID_EMULATOR_PROGRAM} -avd ${ANDROID_EMULATOR_AVD} -no-window -no-boot-anim -noaudio -prop emu.uuid=${EMULATOR_UUID} >/dev/null 2>&1 < /dev/null &") + SET(COMMAND sh -c "${ANDROID_EMULATOR_PROGRAM} -avd ${ANDROID_EMULATOR_AVD} -no-window -no-boot-anim -prop ro.emu.uuid=${EMULATOR_UUID} >${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/android-emulator.log 2>&1 < /dev/null &") ENDIF() EXECUTE_PROCESS( COMMAND ${COMMAND} @@ -335,14 +335,42 @@ FUNCTION(DCMTK_ANDROID_START_EMULATOR VAR) ERROR_QUIET ) IF(NOT RESULT) - DCMTK_ANDROID_SET_OBJECT_PROPERTIES(${VAR} STARTING ${EMULATOR_UUID} "") + DCMTK_ANDROID_SET_OBJECT_PROPERTIES("${VAR}" STARTING "${EMULATOR_UUID}" "") ELSE() - DCMTK_ANDROID_DESTROY_OBJECT(${VAR}) + DCMTK_ANDROID_DESTROY_OBJECT("${VAR}") MESSAGE(FATAL_ERROR "Error starting Android emulator.") ENDIF() ENDIF() ENDFUNCTION(DCMTK_ANDROID_START_EMULATOR) +# +# Restart adb/the emulated device in root mode so that we gain write access to +# the device. +# Newer versions of the SDK seem to require this for doing anything meaningful +# with it. +# EMULATOR_NAME - the name of the emulated device that shall be rooted. +# Will ignore all additional arguments. +# +FUNCTION(DCMTK_ANDROID_ADB_ROOT EMULATOR_NAME) + EXECUTE_PROCESS( + COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" root + OUTPUT_QUIET + ERROR_QUIET + ) + # the SDK was seemingly designed by a five year old, the device will + # become invisible while it is being rooted, therefore, wait until + # it is ready again + SET(STATUS 1) + WHILE(STATUS) + EXECUTE_PROCESS( + COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" wait-for-device + RESULT_VARIABLE STATUS + OUTPUT_QUIET + ERROR_QUIET + ) + ENDWHILE() +ENDFUNCTION(DCMTK_ANDROID_ADB_ROOT) + # # Waits until the given emulator instance becomes online (RUNNING). # VAR - the emulator instance handle object referring to the emulator @@ -355,7 +383,7 @@ ENDFUNCTION(DCMTK_ANDROID_START_EMULATOR) # Will ignore all additional arguments. # FUNCTION(DCMTK_ANDROID_WAIT_FOR_EMULATOR VAR) - DCMTK_ANDROID_GET_OBJECT_PROPERTIES(${VAR}) + DCMTK_ANDROID_GET_OBJECT_PROPERTIES("${VAR}") IF(NOT EMULATOR_STATE) MESSAGE(AUTHOR_WARNING "Error: ${VAR} is not a valid Android emulator instance handle.") ELSEIF(EMULATOR_STATE STREQUAL "RUNNING") @@ -365,9 +393,10 @@ FUNCTION(DCMTK_ANDROID_WAIT_FOR_EMULATOR VAR) ELSE() MESSAGE(STATUS "Waiting until the Android device emulator is ready to receive instructions...") WHILE(NOT EMULATOR_NAME) - DCMTK_ANDROID_GET_EMULATOR_NAME(EMULATOR_NAME ${EMULATOR_UUID}) + DCMTK_ANDROID_GET_EMULATOR_NAME(EMULATOR_NAME "${EMULATOR_UUID}") ENDWHILE() - DCMTK_ANDROID_SET_OBJECT_PROPERTIES(${VAR} RUNNING ${EMULATOR_UUID} ${EMULATOR_NAME}) + DCMTK_ANDROID_ADB_ROOT("${EMULATOR_NAME}") + DCMTK_ANDROID_SET_OBJECT_PROPERTIES("${VAR}" RUNNING "${EMULATOR_UUID}" "${EMULATOR_NAME}") ENDIF() ENDFUNCTION(DCMTK_ANDROID_WAIT_FOR_EMULATOR) @@ -384,9 +413,9 @@ ENDFUNCTION(DCMTK_ANDROID_WAIT_FOR_EMULATOR) # MACRO(DCMTK_ANDROID_STOP_EMULATOR_COMMAND VAR EMULATOR_NAME) IF(CMAKE_HOST_SYSTEM MATCHES "Windows.*") - UNSET(${VAR}) + UNSET("${VAR}") ELSE() - SET(${VAR} ${ANDROID_ADB_PROGRAM} -s ${EMULATOR_NAME} emu kill) + SET("${VAR}" "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" emu kill) ENDIF() ENDMACRO(DCMTK_ANDROID_STOP_EMULATOR_COMMAND) @@ -398,9 +427,9 @@ ENDMACRO(DCMTK_ANDROID_STOP_EMULATOR_COMMAND) # MACRO(DCMTK_ANDROID_EMULATOR_SHUTDOWN_MESSAGE VAR) IF(CMAKE_HOST_SYSTEM MATCHES "Windows.*") - SET(${VAR} WARNING "The Android device emulator can't be terminated automatically under Windows, please shutdown \"${EMULATOR_NAME}\" manually!") + SET("${VAR}" WARNING "The Android device emulator can't be terminated automatically under Windows, please shutdown \"${EMULATOR_NAME}\" manually!") ELSE() - SET(${VAR} STATUS "Shutting down the Android device emulator...") + SET("${VAR}" STATUS "Shutting down the Android device emulator...") ENDIF() ENDMACRO(DCMTK_ANDROID_EMULATOR_SHUTDOWN_MESSAGE) @@ -413,12 +442,12 @@ ENDMACRO(DCMTK_ANDROID_EMULATOR_SHUTDOWN_MESSAGE) # Will ignore all additional arguments. # FUNCTION(DCMTK_ANDROID_STOP_EMULATOR VAR) - DCMTK_ANDROID_GET_OBJECT_PROPERTIES(${VAR}) + DCMTK_ANDROID_GET_OBJECT_PROPERTIES("${VAR}") IF(NOT EMULATOR_STATE) MESSAGE(AUTHOR_WARNING "Error: ${VAR} is not a valid Android emulator instance handle.") ELSEIF(EMULATOR_STATE STREQUAL "STARTING") # Can't tell it to stop if it is not done starting - DCMTK_ANDROID_WAIT_FOR_EMULATOR(${VAR}) + DCMTK_ANDROID_WAIT_FOR_EMULATOR("${VAR}") ELSEIF(EMULATOR_STATE STREQUAL "STOPPED") # Emulator is already stopped, do nothing RETURN() @@ -426,7 +455,7 @@ FUNCTION(DCMTK_ANDROID_STOP_EMULATOR VAR) DCMTK_ANDROID_EMULATOR_SHUTDOWN_MESSAGE(MESSAGE) MESSAGE(${MESSAGE}) IF(NOT CMAKE_HOST_SYSTEM MATCHES "Windows.*") - DCMTK_ANDROID_STOP_EMULATOR_COMMAND(COMMAND ${EMULATOR_NAME}) + DCMTK_ANDROID_STOP_EMULATOR_COMMAND(COMMAND "${EMULATOR_NAME}") EXECUTE_PROCESS( COMMAND ${COMMAND} RESULT_VARIABLE RESULT @@ -434,7 +463,7 @@ FUNCTION(DCMTK_ANDROID_STOP_EMULATOR VAR) ERROR_QUIET ) IF(NOT RESULT) - DCMTK_ANDROID_SET_OBJECT_PROPERTIES(${VAR} STOPPED ${EMULATOR_UUID} "") + DCMTK_ANDROID_SET_OBJECT_PROPERTIES("${VAR}" STOPPED "${EMULATOR_UUID}" "") ELSE() MESSAGE(WARNING "Unable to stop the android device emulator, please shutdown \"${EMULATOR_NAME}\" manually!") ENDIF() @@ -450,14 +479,14 @@ ENDFUNCTION(DCMTK_ANDROID_STOP_EMULATOR) # CMake's FILE(COPY ...) command. # FUNCTION(DCMTK_ANDROID_PUSH VAR) - DCMTK_ANDROID_GET_OBJECT_PROPERTIES(${VAR}) + DCMTK_ANDROID_GET_OBJECT_PROPERTIES("${VAR}") IF(NOT EMULATOR_STATE) MESSAGE(AUTHOR_WARNING "Error: ${VAR} is not a valid Android emulator instance handle.") ELSEIF(EMULATOR_STATE STREQUAL "RUNNING") CMAKE_PARSE_ARGUMENTS(DCMTK_ANDROID_PUSH "" "" "DESTINATION" ${ARGN}) FOREACH(LOCAL_FILE ${DCMTK_ANDROID_PUSH_UNPARSED_ARGUMENTS}) EXECUTE_PROCESS( - COMMAND ${ANDROID_ADB_PROGRAM} -s ${EMULATOR_NAME} push ${LOCAL_FILE} ${DCMTK_ANDROID_PUSH_DESTINATION} + COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" push "${LOCAL_FILE}" "${DCMTK_ANDROID_PUSH_DESTINATION}" RESULT_VARIABLE RESULT OUTPUT_QUIET ERROR_QUIET @@ -477,14 +506,14 @@ ENDFUNCTION(DCMTK_ANDROID_PUSH) # CMake's FILE(COPY ...) command. # FUNCTION(DCMTK_ANDROID_PULL VAR) - DCMTK_ANDROID_GET_OBJECT_PROPERTIES(${VAR}) + DCMTK_ANDROID_GET_OBJECT_PROPERTIES("${VAR}") IF(NOT EMULATOR_STATE) MESSAGE(AUTHOR_WARNING "Error: ${VAR} is not a valid Android emulator instance handle.") ELSEIF(EMULATOR_STATE STREQUAL "RUNNING") CMAKE_PARSE_ARGUMENTS(DCMTK_ANDROID_PULL "" "" "DESTINATION" ${ARGN}) FOREACH(REMOTE_FILE ${DCMTK_ANDROID_PULL_UNPARSED_ARGUMENTS}) EXECUTE_PROCESS( - COMMAND ${ANDROID_ADB_PROGRAM} -s ${EMULATOR_NAME} pull ${REMOTE_FILE} ${DCMTK_ANDROID_PULL_DESTINATION} + COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" pull "${REMOTE_FILE}" "${DCMTK_ANDROID_PULL_DESTINATION}" RESULT_VARIABLE RESULT OUTPUT_QUIET ERROR_QUIET @@ -504,7 +533,7 @@ ENDFUNCTION(DCMTK_ANDROID_PULL) # CMake's EXECUTE_PROCESS(...) command. # FUNCTION(DCMTK_ANDROID_SHELL VAR) - DCMTK_ANDROID_GET_OBJECT_PROPERTIES(${VAR}) + DCMTK_ANDROID_GET_OBJECT_PROPERTIES("${VAR}") IF(NOT EMULATOR_STATE) MESSAGE(AUTHOR_WARNING "Error: ${VAR} is not a valid Android emulator instance handle.") ELSEIF(EMULATOR_STATE STREQUAL "RUNNING") @@ -516,7 +545,7 @@ FUNCTION(DCMTK_ANDROID_SHELL VAR) ) # Prepare commandline - SET(COMMAND ${ANDROID_ADB_PROGRAM} -s ${EMULATOR_NAME} shell) + SET(COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" shell) IF(DCMTK_ANDROID_SHELL_WORKING_DIRECTORY) LIST(APPEND COMMAND "cd" "${DCMTK_ANDROID_SHELL_WORKING_DIRECTORY}" "&&") ENDIF() @@ -552,13 +581,13 @@ FUNCTION(DCMTK_ANDROID_SHELL VAR) # Prepare output redirection (buffering) IF(STREAMS_MERGED) - LIST(APPEND COMMAND > ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output 2>&1) + LIST(APPEND COMMAND > "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output" 2>&1) ELSE() - LIST(APPEND COMMAND > ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output 2> ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_error) + LIST(APPEND COMMAND > "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output" 2> "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_error") ENDIF() # Prepare capturing the result - LIST(APPEND COMMAND "\;" echo -n $? > ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_result) + LIST(APPEND COMMAND "\;" echo -n $? > "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_result") # Run the command EXECUTE_PROCESS( @@ -572,45 +601,45 @@ FUNCTION(DCMTK_ANDROID_SHELL VAR) IF(ADB_RESULT) MESSAGE(WARNING "Error sending command to the Android emulator, adb reported the error: ${ADB_OUTPUT}") IF(DCMTK_ANDROID_SHELL_RESULT_VARIABLE) - SET(${DCMTK_ANDROID_SHELL_RESULT_VARIABLE} ${ADB_RESULT} PARENT_SCOPE) + SET("${DCMTK_ANDROID_SHELL_RESULT_VARIABLE}" ${ADB_RESULT} PARENT_SCOPE) ENDIF() ELSE(ADB_RESULT) # Receive results - DCMTK_ANDROID_PULL(${VAR} ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_error ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_result - DESTINATION ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY} + DCMTK_ANDROID_PULL("${VAR}" "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output" "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_error" "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_result" + DESTINATION "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}" ) # Cleanup temp files EXECUTE_PROCESS( - COMMAND ${ANDROID_ADB_PROGRAM} -s ${EMULATOR_NAME} shell rm ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output "\;" rm ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_error "\;" rm ${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_result + COMMAND "${ANDROID_ADB_PROGRAM}" -s "${EMULATOR_NAME}" shell rm "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_output" "\;" rm "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_error" "\;" rm "${ANDROID_TEMPORARY_FILES_LOCATION}/${PREFIX}_result" RESULT_VARIABLE RESULT_QUIET OUTPUT_QUIET ERROR_QUIET ) # Analyze results IF(DCMTK_ANDROID_SHELL_RESULT_VARIABLE) - FILE(READ ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_result ${DCMTK_ANDROID_SHELL_RESULT_VARIABLE}) - SET(${DCMTK_ANDROID_SHELL_RESULT_VARIABLE} ${${DCMTK_ANDROID_SHELL_RESULT_VARIABLE}} PARENT_SCOPE) + FILE(READ "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_result" "${DCMTK_ANDROID_SHELL_RESULT_VARIABLE}") + SET("${DCMTK_ANDROID_SHELL_RESULT_VARIABLE}" ${${DCMTK_ANDROID_SHELL_RESULT_VARIABLE}} PARENT_SCOPE) ENDIF() IF(NOT DCMTK_ANDROID_SHELL_OUTPUT_QUIET OR (STREAMS_MERGED AND NOT DCMTK_ANDROID_SHELL_ERROR_QUIET)) - FILE(READ ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_output ${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE}) + FILE(READ "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_output" "${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE}") IF(PUSH_OUTPUT_VAR) - SET(${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE} ${${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE}} PARENT_SCOPE) + SET("${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE}" ${${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE}} PARENT_SCOPE) ELSE() MESSAGE("${${DCMTK_ANDROID_SHELL_OUTPUT_VARIABLE}}") ENDIF() ENDIF() IF(NOT DCMTK_ANDROID_SHELL_ERROR_QUIET AND NOT STREAMS_MERGED) - FILE(READ ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_error ${DCMTK_ANDROID_SHELL_ERROR_VARIABLE}) + FILE(READ "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_error" "${DCMTK_ANDROID_SHELL_ERROR_VARIABLE}") IF(PUSH_ERROR_VAR) - SET(${DCMTK_ANDROID_SHELL_ERROR_VARIABLE} ${${DCMTK_ANDROID_SHELL_ERROR_VARIABLE}} PARENT_SCOPE) + SET("${DCMTK_ANDROID_SHELL_ERROR_VARIABLE}" ${${DCMTK_ANDROID_SHELL_ERROR_VARIABLE}} PARENT_SCOPE) ELSE() MESSAGE("${${DCMTK_ANDROID_SHELL_ERROR_VARIABLE}}") ENDIF() ENDIF() # Cleanup temp files - FILE(REMOVE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_result) - FILE(REMOVE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_output) - FILE(REMOVE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_error) + FILE(REMOVE "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_result") + FILE(REMOVE "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_output") + FILE(REMOVE "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_error") ENDIF(ADB_RESULT) ELSE() MESSAGE(AUTHOR_WARNING "Error: the Android emulator \"${VAR}\" is not ready to receive commands") diff --git a/CMake/dcmtkUseWine.cmake b/CMake/dcmtkUseWine.cmake index 0ae2a3e1..34336424 100644 --- a/CMake/dcmtkUseWine.cmake +++ b/CMake/dcmtkUseWine.cmake @@ -33,8 +33,67 @@ FUNCTION(DCMTK_SETUP_WINE) "Please set WINE_WINE_PROGRAM and WINE_WINEPATH_PROGRAM appropriately." ) ENDIF() + # prepare wine prefix for configure and unit tests + IF(NOT DCMTK_WINEPREFIX) + SET(DCMTK_WINEPREFIX "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/wineprefix" CACHE INTERNALE "the path of the wineprefix to use for configuration and unit tests") + MESSAGE(STATUS "Info: Preparing wine prefix for configuration and unit tests: ${DCMTK_WINEPREFIX}") + STRING(REPLACE "\\" "\\\\" WINE_CPP_RUNTIME "${WINE_CPP_RUNTIME}") + SET(WINE_PATH_REG "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkWinePath.reg") + CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/dcmtkWinePath.reg.in" "${WINE_PATH_REG}" ESCAPE_QUOTES @ONLY) + SET(ENV{WINEPREFIX} "${DCMTK_WINEPREFIX}") + EXECUTE_PROCESS(COMMAND "${WINE_WINE_PROGRAM}" "regedit" "${WINE_PATH_REG}" + OUTPUT_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/wineprefix.log" + ERROR_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/wineprefix.log" + OUTPUT_VARIABLE RESULT + ) + IF(RESULT) + SET(DCMTK_WINEPREFIX CACHE INTERNAL "error, see ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/wineprefix.log") + MESSAGE(FATAL_ERROR "Failed to setup the wineprefix, see \"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/wineprefix.log\"") + ENDIF() + ELSE() + SET(ENV{WINEPREFIX} "${DCMTK_WINEPREFIX}") + ENDIF() ENDFUNCTION(DCMTK_SETUP_WINE) +# +# Helper function to detach the output and error streams from a wine process, so +# that CMake doesn't wait for the wineserver to quit before continuing execution. +# VAR - the variable that will hold the exit code of the launched process. +# OUTPUT_VAR - the variable that will hold the standard output of the launched process. +# ERROR_VAR - the variable that will hold the error output of the launched process. +# ARGN - the command to execute. +# +FUNCTION(WINE_DETACHED VAR OUTPUT_VAR ERROR_VAR) + # Prefix to prevent collision of output capturing files + IF(CMAKE_VERSION VERSION_LESS 2.8.7) + STRING(RANDOM LENGTH 20 ALPHABET "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" PREFIX) + ELSE() + STRING(MD5 PREFIX "${ARGN}") + ENDIF() + SET(OUTPUT_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_output") + IF(OUTPUT_VAR STREQUAL ERROR_VAR) + SET(ERROR_FILE "${OUTPUT_FILE}") + ELSE() + SET(ERROR_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PREFIX}_error") + ENDIF() + EXECUTE_PROCESS( + COMMAND ${ARGN} + OUTPUT_FILE "${OUTPUT_FILE}" + ERROR_FILE "${ERROR_FILE}" + RESULT_VARIABLE RESULT + ) + FILE(READ "${OUTPUT_FILE}" OUTPUT) + SET("${OUTPUT_VAR}" ${OUTPUT} PARENT_SCOPE) + IF(OUTPUT_VAR STREQUAL ERROR_VAR) + FILE(REMOVE "${OUTPUT_FILE}") + ELSE() + FILE(READ "${ERROR_FILE}" ERROR) + SET("${ERROR_VAR}" ${ERROR} PARENT_SCOPE) + FILE(REMOVE "${OUTPUT_FILE}" "${ERROR_FILE}") + ENDIF() + SET("${VAR}" ${RESULT} PARENT_SCOPE) +ENDFUNCTION(WINE_DETACHED) + # # Uses 'winepath' to translate a host path or filename to the location it can be # accessed from within the emulated Windows environment (e. g. replaces '/' by '\'). @@ -44,12 +103,7 @@ ENDFUNCTION(DCMTK_SETUP_WINE) # Additional arguments will be ignored. # FUNCTION(UNIX_TO_WINE_PATH VAR PATH) - EXECUTE_PROCESS( - COMMAND ${WINE_WINEPATH_PROGRAM} -w ${PATH} - RESULT_VARIABLE ERROR - OUTPUT_VARIABLE RESULT - ERROR_VARIABLE STDERR - ) + WINE_DETACHED(ERROR RESULT STDERR "${WINE_WINEPATH_PROGRAM}" "-w" "${PATH}") IF(NOT ERROR) STRING(REPLACE "\n" "" RESULT ${RESULT}) SET(${VAR} ${RESULT} PARENT_SCOPE) @@ -69,5 +123,5 @@ ENDFUNCTION() FUNCTION(WINE_COMMAND VAR COMMAND) UNIX_TO_WINE_PATH(CMD ${COMMAND}) SEPARATE_ARGUMENTS(ARGS WINDOWS_COMMAND "${ARGN}") - SET(${VAR} ${WINE_WINE_PROGRAM} cmd /c "PATH=${WINE_CPP_RUNTIME}\;%PATH%" \\& ${CMD} ${ARGS} PARENT_SCOPE) + SET(${VAR} "${CMD}" ${ARGS} PARENT_SCOPE) ENDFUNCTION() diff --git a/CMake/dcmtkWinePath.reg.in b/CMake/dcmtkWinePath.reg.in new file mode 100644 index 00000000..78d3dd91 --- /dev/null +++ b/CMake/dcmtkWinePath.reg.in @@ -0,0 +1,4 @@ +REGEDIT4 + +[HKEY_CURRENT_USER\Environment] +"PATH"="@WINE_CPP_RUNTIME@" diff --git a/CMake/osconfig.h.in b/CMake/osconfig.h.in index bfe7e5c0..9b7a2fa9 100644 --- a/CMake/osconfig.h.in +++ b/CMake/osconfig.h.in @@ -213,6 +213,9 @@ /* Define to 1 if you have the `getlogin' function. */ #cmakedefine HAVE_GETLOGIN @HAVE_GETLOGIN@ +/* Define to 1 if you have the `getlogin_r' function. */ +#cmakedefine HAVE_GETLOGIN_R @HAVE_GETLOGIN_R@ + /* Define to 1 if you have the `getpid' function. */ #cmakedefine HAVE_GETPID @HAVE_GETPID@ @@ -294,10 +297,8 @@ /* Define to 1 if you have the `nsl' library (-lnsl). */ #cmakedefine HAVE_LIBNSL @HAVE_LIBNSL@ -/* Define to 1 if you have the header file. */ -/* Comment this out so inside dipipng.cxx we can include */ -/* instead of KW 20060622 */ -/* #cmakedefine HAVE_LIBPNG_PNG_H @HAVE_LIBPNG_PNG_H@ */ +/* Define to 1 if the header shall be used instead of . */ +#cmakedefine HAVE_LIBPNG_PNG_H @HAVE_LIBPNG_PNG_H@ /* Define to 1 if you have the `socket' library (-lsocket). */ #cmakedefine HAVE_LIBSOCKET @HAVE_LIBSOCKET@ @@ -389,11 +390,17 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_SYSTEMINFO_H @HAVE_SYS_SYSTEMINFO_H@ +/* Define to 1 if you have readdir_r */ +#cmakedefine HAVE_READDIR_R @HAVE_READDIR_R@ + /* Define if your system supports readdir_r with the obsolete Posix 1.c draft 6 declaration (2 arguments) instead of the Posix 1.c declaration with 3 arguments. */ /* #undef HAVE_OLD_READDIR_R */ +/* Define if your system has a prototype for feenableexcept in fenv.h */ +#cmakedefine HAVE_PROTOTYPE_FEENABLEEXCEPT @HAVE_PROTOTYPE_FEENABLEEXCEPT@ + /* Define if your system has a prototype for accept in sys/types.h sys/socket.h */ #cmakedefine HAVE_PROTOTYPE_ACCEPT @HAVE_PROTOTYPE_ACCEPT@ @@ -426,6 +433,10 @@ stdlib.h netdb.h */ #cmakedefine HAVE_PROTOTYPE_GETHOSTBYNAME_R @HAVE_PROTOTYPE_GETHOSTBYNAME_R@ +/* Define if your system has a prototype for gethostbyaddr_r in libc.h unistd.h + stdlib.h netdb.h */ +#cmakedefine HAVE_PROTOTYPE_GETHOSTBYADDR_R @HAVE_PROTOTYPE_GETHOSTBYADDR_R@ + /* Define if your system has a prototype for gethostid in libc.h unistd.h stdlib.h netdb.h */ #cmakedefine HAVE_PROTOTYPE_GETHOSTID @HAVE_PROTOTYPE_GETHOSTID@ @@ -798,8 +809,11 @@ /* Define to 1 if you have the `nanosleep' function. */ #cmakedefine HAVE_NANOSLEEP @HAVE_NANOSLEEP@ +/* Define if libc.h should be treated as a C++ header */ +#cmakedefine INCLUDE_LIBC_H_AS_CXX @INCLUDE_LIBC_H_AS_CXX@ + /* Define if fails if included extern "C" */ -#define INCLUDE_MATH_H_AS_CXX 1 +#cmakedefine INCLUDE_MATH_H_AS_CXX @INCLUDE_MATH_H_AS_CXX@ /* Define to 1 if you have variable length arrays. */ #cmakedefine HAVE_VLA @HAVE_VLA@ @@ -843,16 +857,12 @@ /* Define if signal handlers need ellipse (...) parameters */ /* #undef SIGNAL_HANDLER_WITH_ELLIPSE */ -/* Define to enable LFS64 (explicit large file support) if available*/ -#cmakedefine _LARGEFILE64_SOURCE @_LARGEFILE64_SOURCE@ +/* LFS mode constants. */ +#define DCMTK_LFS 1 +#define DCMTK_LFS64 2 -/* Explicitly request large file support, assuming it exists if fseeko() exists */ -#if defined(HAVE_FSEEKO) && !defined(_LARGEFILE_SOURCE) -#define _LARGEFILE_SOURCE 1 -#endif -#if defined(_LARGEFILE_SOURCE) && !defined(_FILE_OFFSET_BITS) -#define _FILE_OFFSET_BITS 64 -#endif +/* Select LFS mode (defined above) that shall be used or don't define it */ +#cmakedefine DCMTK_ENABLE_LFS @DCMTK_LFS_MODE@ /* The size of a `char', as computed by sizeof. */ #cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@ @@ -875,6 +885,12 @@ /* The size of a `void *', as computed by sizeof. */ #cmakedefine SIZEOF_VOID_P @SIZEOF_VOID_P@ +/* The size of a `fpos_t', as computed by sizeof. */ +#cmakedefine SIZEOF_FPOS_T @SIZEOF_FPOS_T@ + +/* The size of a `off_t', as computed by sizeof. */ +#cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@ + /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 @@ -992,6 +1008,9 @@ typedef unsigned long ulong; #cmakedefine HAVE_LONGLONG #cmakedefine HAVE_ULONGLONG +#cmakedefine HAVE_INT64_T @HAVE_INT64_T@ +#cmakedefine HAVE_UINT64_T @HAVE_UINT64_T@ + /* Additional settings for Borland C++ Builder */ #ifdef __BORLANDC__ #define _stricmp stricmp /* _stricmp in MSVC is stricmp in Borland C++ */ @@ -1005,7 +1024,6 @@ typedef unsigned long ulong; #endif #define HAVE_PROTOTYPE_MKTEMP 1 #undef HAVE_SYS_UTIME_H -#define NO_IOS_BASE_ASSIGN 1 #define _MSC_VER 1200 /* Treat Borland C++ 5.5 as MSVC6. */ #endif /* __BORLANDC__ */ @@ -1043,49 +1061,18 @@ typedef unsigned long ulong; /* Define if your system defines ios::nocreate in iostream.h */ #cmakedefine HAVE_IOS_NOCREATE @HAVE_IOS_NOCREATE@ -#ifdef USE_STD_CXX_INCLUDES - /* Define if ANSI standard C++ includes use std namespace */ -#define HAVE_STD_NAMESPACE 1 - -/* Define if it is not possible to assign stream objects */ -#define NO_IOS_BASE_ASSIGN 1 +#cmakedefine HAVE_STD_NAMESPACE @HAVE_STD_NAMESPACE@ /* Define if the compiler supports std::nothrow */ -#define HAVE_STD__NOTHROW 1 - -/* Define if the compiler supports operator delete (std::nothrow). - * Microsoft Visual C++ 6.0 does NOT have it, newer versions do. - * For other compilers, by default assume that it exists. - */ -#if defined(_MSC_VER) && (_MSC_VER <= 1200) -/* #undef HAVE_NOTHROW_DELETE */ -#else -#define HAVE_NOTHROW_DELETE 1 -#endif - -/* Define if your system has a prototype for std::vfprintf in stdarg.h */ -/* #undef HAVE_PROTOTYPE_STD__VFPRINTF */ - -#else - -/* Define if ANSI standard C++ includes use std namespace */ -/* #undef HAVE_STD_NAMESPACE */ - -/* Define if it is not possible to assign stream objects */ -/* #undef NO_IOS_BASE_ASSIGN */ - -/* Define if the compiler supports std::nothrow */ -/* #undef HAVE_STD__NOTHROW */ +#cmakedefine HAVE_STD__NOTHROW @HAVE_STD__NOTHROW@ /* Define if the compiler supports operator delete (std::nothrow) */ -/* #undef HAVE_NOTHROW_DELETE */ +#cmakedefine HAVE_NOTHROW_DELETE @HAVE_NOTHROW_DELETE@ /* Define if your system has a prototype for std::vfprintf in stdarg.h */ #cmakedefine HAVE_PROTOTYPE_STD__VFPRINTF @HAVE_PROTOTYPE_STD__VFPRINTF@ -#endif /* USE_STD_CXX_INCLUDES */ - /* Define if your system has off64_t */ #cmakedefine HAVE_OFF64_T @HAVE_OFF64_T@ @@ -1110,13 +1097,12 @@ typedef unsigned long ulong; /* Always define STDIO_NAMESPACE to ::, because MSVC6 gets mad if you don't. */ #define STDIO_NAMESPACE :: -/* Enable or disable C++11 while building DCMTK */ -#cmakedefine DCMTK_USE_CXX11_STL @DCMTK_USE_CXX11_STL@ +/* Define if we can use C++11 */ +#cmakedefine HAVE_CXX11 @HAVE_CXX11@ -#if defined(DCMTK_USE_CXX11_STL) && defined(__cplusplus) && __cplusplus < 201103L +#if defined(HAVE_CXX11) && defined(__cplusplus) && __cplusplus < 201103L #error\ - DCMTK was configured to use the C++11 STL, but your compiler is not configured\ - for building with C++11 features. +DCMTK was configured to use C++11 features, but your compiler does not or was not configured to provide them. #endif /* Define if the compiler supports __alignof__ */ @@ -1131,9 +1117,6 @@ typedef unsigned long ulong; /* Define if __attribute__((aligned)) supports templates */ #cmakedefine ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES @ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES@ -/* Define if alignas supports typedefs */ -#cmakedefine ALIGNAS_SUPPORTS_TYPEDEFS @ALIGNAS_SUPPORTS_TYPEDEFS@ - /* Define if the compiler supports __declspec(align) */ #cmakedefine HAVE_DECLSPEC_ALIGN @HAVE_DECLSPEC_ALIGN@ @@ -1146,4 +1129,37 @@ typedef unsigned long ulong; /* The path on the Android device that should be used for temporary files */ #cmakedefine ANDROID_TEMPORARY_FILES_LOCATION "@ANDROID_TEMPORARY_FILES_LOCATION@" +/* Define if we are supposed to use STL's vector */ +#cmakedefine HAVE_STL_VECTOR @HAVE_STL_VECTOR@ + +/* Define if we are supposed to use STL's algorithms */ +#cmakedefine HAVE_STL_ALGORITHM @HAVE_STL_ALGORITHM@ + +/* Define if we are supposed to use STL's limit */ +#cmakedefine HAVE_STL_LIMITS @HAVE_STL_LIMITS@ + +/* Define if we are supposed to use STL's list */ +#cmakedefine HAVE_STL_LIST @HAVE_STL_LIST@ + +/* Define if we are supposed to use STL's list */ +#cmakedefine HAVE_STL_MAP @HAVE_STL_MAP@ + +/* Define if we are supposed to use STL's memory */ +#cmakedefine HAVE_STL_MEMORY @HAVE_STL_MEMORY@ + +/* Define if we are supposed to use STL's stack */ +#cmakedefine HAVE_STL_STACK @HAVE_STL_STACK@ + +/* Define if we are supposed to use STL's string */ +#cmakedefine HAVE_STL_STRING @HAVE_STL_STRING@ + +/* Define if we are supposed to use STL's type_traits */ +#cmakedefine HAVE_STL_TYPE_TRAITS @HAVE_STL_TYPE_TRAITS@ + +/* Define if we are supposed to use STL's tuple */ +#cmakedefine HAVE_STL_TUPLE @HAVE_STL_TUPLE@ + +/* Define if we are supposed to use STL's system_error */ +#cmakedefine HAVE_STL_SYSTEM_ERROR @HAVE_STL_SYSTEM_ERROR@ + #endif /* !OSCONFIG_H*/ diff --git a/CMakeLists.txt b/CMakeLists.txt index b54f69a5..59a7587b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,16 @@ PROJECT(DCMTK) # Minimum CMake version required -CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3) + +# Disables a warning emitted by CMake 3.7.2. The same setting is performed +# again in CMake/dcmtkPrepare.cmake (included below), but the warning is still +# emitted if it is not set here (it only goes away if the policy is set in +# both files). +# We do not entirely understand this behavior, perhaps it is a bug in CMake? +IF(POLICY CMP0017) + CMAKE_POLICY(SET CMP0017 NEW) +ENDIF() # Check the build system INCLUDE(CMake/dcmtkPrepare.cmake NO_POLICY_SCOPE) @@ -22,9 +31,9 @@ SET(DCMTK_MODULES ofstd oflog dcmdata dcmimgle # Include directories #----------------------------------------------------------------------------- -SET(DCMTK_INCLUDE_DIR ${DCMTK_BINARY_DIR}/config/include) +SET(DCMTK_INCLUDE_DIR "${DCMTK_BINARY_DIR}/config/include") FOREACH(inc ${DCMTK_MODULES}) - LIST(APPEND DCMTK_INCLUDE_DIR ${DCMTK_SOURCE_DIR}/${inc}/include) + LIST(APPEND DCMTK_INCLUDE_DIR "${DCMTK_SOURCE_DIR}/${inc}/include") ENDFOREACH(inc) INCLUDE_DIRECTORIES(${DCMTK_INCLUDE_DIR}) @@ -34,8 +43,8 @@ INCLUDE_DIRECTORIES(${DCMTK_INCLUDE_DIR}) #----------------------------------------------------------------------------- # add the osconfig.h.in file -CONFIGURE_FILE(${DCMTK_SOURCE_DIR}/CMake/osconfig.h.in - ${DCMTK_BINARY_DIR}/config/include/dcmtk/config/osconfig.h) +CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/osconfig.h.in" + "${DCMTK_BINARY_DIR}/config/include/dcmtk/config/osconfig.h") #----------------------------------------------------------------------------- # Prepare arith.h @@ -43,6 +52,28 @@ CONFIGURE_FILE(${DCMTK_SOURCE_DIR}/CMake/osconfig.h.in INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES() +# ---------------------------------------------------------------------------- +# Unit test related configuration/setup +# ---------------------------------------------------------------------------- + +IF(CMAKE_CROSSCOMPILING) + IF(WIN32) + SET(DCMTK_RUN_CTEST_SCRIPT "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkCTestRunWine.cmake" CACHE INTERNAL "path to the CMake script for launching a unit test as a detached Wine process in the prepared wineprefix") + ELSEIF(ANDROID) + SET(DCMTK_RUN_CTEST_SCRIPT "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkCTestRunAndroid.cmake" CACHE INTERNAL "path to the CMake script for launching a unit test via the android emulator") + ELSE() + MESSAGE(WARNING "Emulation for your target platform is not available, CTest will not be able to execute the unit tests!") + ENDIF() +ELSE(CMAKE_CROSSCOMPILING) + SET(DCMTK_RUN_CTEST_SCRIPT "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dcmtkCTestRun.cmake" CACHE INTERNAL "path to the CMake script for launching a unit test") +ENDIF(CMAKE_CROSSCOMPILING) +# Add a target to run the unit tests in exhaustive mode +ADD_CUSTOM_TARGET("test-exhaustive" + COMMAND "${CMAKE_COMMAND}" "-P" + "${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestRunExhaustive.cmake" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" +) + #----------------------------------------------------------------------------- # Start actual compilation tasks #----------------------------------------------------------------------------- @@ -58,16 +89,16 @@ INCLUDE(CMake/dcmtkAfterModules.cmake NO_POLICY_SCOPE) #----------------------------------------------------------------------------- # Install global headers -INSTALL(FILES ${DCMTK_BINARY_DIR}/config/include/dcmtk/config/osconfig.h - ${DCMTK_BINARY_DIR}/config/include/dcmtk/config/arith.h - DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk/config +INSTALL(FILES "${DCMTK_BINARY_DIR}/config/include/dcmtk/config/osconfig.h" + "${DCMTK_BINARY_DIR}/config/include/dcmtk/config/arith.h" + DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk/config" COMPONENT include) # Install DCMTK's general documentation files INSTALL(FILES ANNOUNCE CHANGES COPYRIGHT CREDITS FAQ HISTORY VERSION - DESTINATION ${DCMTK_INSTALL_DOCDIR} + DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc) -INSTALL(DIRECTORY docs/ DESTINATION ${DCMTK_INSTALL_DOCDIR} +INSTALL(DIRECTORY docs/ DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc FILES_MATCHING PATTERN "CHANGES.???") #----------------------------------------------------------------------------- @@ -97,11 +128,11 @@ IF(HAVE_CONFIGURE_PACKAGE_CONFIG_FILE AND HAVE_WRITE_BASIC_PACKAGE_VERSION_FILE) # defined within CMake/GenerateCMakeExports.cmake. # Install DCMTKTargets.cmake to install tree INSTALL(EXPORT DCMTKTargets FILE DCMTKTargets.cmake - DESTINATION ${DCMTK_INSTALL_CMKDIR} COMPONENT cmake) + DESTINATION "${DCMTK_INSTALL_CMKDIR}" COMPONENT cmake) # Install DCMTKConfig.cmake and DCMTKConfigVersion.cmake - INSTALL(FILES ${DCMTK_INSTALL_CONFIG} ${DCMTK_CONFIG_VERSION} - DESTINATION ${DCMTK_INSTALL_CMKDIR} COMPONENT cmake) + INSTALL(FILES "${DCMTK_INSTALL_CONFIG}" "${DCMTK_CONFIG_VERSION}" + DESTINATION "${DCMTK_INSTALL_CMKDIR}" COMPONENT cmake) ELSE(HAVE_CONFIGURE_PACKAGE_CONFIG_FILE AND HAVE_WRITE_BASIC_PACKAGE_VERSION_FILE) @@ -109,29 +140,53 @@ ELSE(HAVE_CONFIGURE_PACKAGE_CONFIG_FILE AND HAVE_WRITE_BASIC_PACKAGE_VERSION_FIL MESSAGE(STATUS "Warning: Using old CONFIGURE_FILE() mechanism to produce DCMTKConfig.cmake") # Actually configure file - CONFIGURE_FILE(${DCMTK_SOURCE_DIR}/CMake/DCMTKConfig.cmake26.in - ${DCMTK_BINARY_DIR}/DCMTKConfig.cmake @ONLY) + CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/DCMTKConfig.old_cmake.in" + "${DCMTK_BINARY_DIR}/DCMTKConfig.cmake" @ONLY) # Install DCMTKConfig.cmake and DCMTKConfigVersion.cmake - INSTALL(FILES ${DCMTK_BINARY_DIR}/DCMTKConfig.cmake ${DCMTK_BINARY_DIR}/DCMTKConfigVersion.cmake - DESTINATION ${DCMTK_INSTALL_CMKDIR} + INSTALL(FILES "${DCMTK_BINARY_DIR}/DCMTKConfig.cmake" "${DCMTK_BINARY_DIR}/DCMTKConfigVersion.cmake" + DESTINATION "${DCMTK_INSTALL_CMKDIR}" COMPONENT cmake) ENDIF(HAVE_CONFIGURE_PACKAGE_CONFIG_FILE AND HAVE_WRITE_BASIC_PACKAGE_VERSION_FILE) #----------------------------------------------------------------------------- -# Configure files needed for cross compiling (if any) +# Configure files needed for running the unit tests and cleanup #----------------------------------------------------------------------------- IF(CMAKE_CROSSCOMPILING) - IF(ANDROID) - # setup the CTestCustom.cmake file as appropriate for android - FILE(COPY ${DCMTK_SOURCE_DIR}/CMake/CTest/CTestCustom.cmake - DESTINATION ${CMAKE_BINARY_DIR} + IF(WIN32) + STRING(REPLACE ";" "${ENVIRONMENT_PATH_SEPARATOR}" DCMDICTPATH "${DCMTK_DICOM_DICTIONARIES}") + CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/CTest/CTestCustomWine.cmake.in" + "${DCMTK_BINARY_DIR}/CTestCustom.cmake" ESCAPE_QUOTES @ONLY + ) + CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestRunWine.cmake.in" + "${DCMTK_RUN_CTEST_SCRIPT}" ESCAPE_QUOTES @ONLY + ) + ELSEIF(ANDROID) + DCMTK_ANDROID_STOP_EMULATOR(DCMTK_ANDROID_EMULATOR_INSTANCE) + # Prepare setting environment variable DCMDICTPATH + SET(DICTIONARIES ${DCMTK_DICOM_DICTIONARIES}) + LIST(GET DICTIONARIES 0 DCMDICTPATH) + LIST(REMOVE_AT DICTIONARIES 0) + GET_FILENAME_COMPONENT(DCMDICTPATH "${DCMDICTPATH}" NAME) + SET(DCMDICTPATH "${ANDROID_TEMPORARY_FILES_LOCATION}/${DCMDICTPATH}") + FOREACH(DICTIONARY ${DICTIONARIES}) + GET_FILENAME_COMPONENT(FILE "${DICTIONARY}" NAME) + SET(DCMDICTPATH "${DCMDICTPATH}:${ANDROID_TEMPORARY_FILES_LOCATION}/${FILE}") + ENDFOREACH() + CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/CTest/CTestCustomAndroid.cmake.in" + "${DCMTK_BINARY_DIR}/CTestCustom.cmake" ESCAPE_QUOTES @ONLY ) - # prepare the configuration for unit testing - CONFIGURE_FILE(${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestConfig.cmake.in - ${CMAKE_BINARY_DIR}/dcmtkCTestConfig.cmake @ONLY + CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestRunAndroid.cmake.in" + "${DCMTK_RUN_CTEST_SCRIPT}" ESCAPE_QUOTES @ONLY ) + ELSE() + # nothing to do ENDIF() +ELSE(CMAKE_CROSSCOMPILING) + STRING(REPLACE ";" "${ENVIRONMENT_PATH_SEPARATOR}" DCMDICTPATH "${DCMTK_DICOM_DICTIONARIES}") + CONFIGURE_FILE("${DCMTK_SOURCE_DIR}/CMake/CTest/dcmtkCTestRun.cmake.in" + "${DCMTK_RUN_CTEST_SCRIPT}" ESCAPE_QUOTES @ONLY + ) ENDIF(CMAKE_CROSSCOMPILING) diff --git a/COPYRIGHT b/COPYRIGHT index a73c4cb6..fd2f3ab9 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -5,7 +5,7 @@ Unless otherwise specified, the DCMTK software package has the following copyright: /* - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. * * This software and supporting documentation were developed by @@ -478,7 +478,7 @@ The dcmrt sub-package is covered by the following copyright: --------------------------------------------------------------------------- Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany -Copyright (C) 2013-2016, J. Riesmeier, Oldenburg, Germany +Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany All rights reserved. Redistribution and use in source and binary forms, with or without @@ -511,7 +511,7 @@ Parts of the dcmsr sub-package are covered by the following copyright: --------------------------------------------------------------------------- -Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany +Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany All rights reserved. Redistribution and use in source and binary forms, with or without @@ -542,44 +542,6 @@ POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------- -The Android toolchain configuration file for CMake -(CMake/android.toolchain.cmake) is borrowed from the OpenCV project and is -covered by the following copyright: - ---------------------------------------------------------------------------- - -# Copyright (c) 2010-2011, Ethan Rublee -# Copyright (c) 2011-2014, Andrey Kamaev -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# 3. Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from this -# software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - ---------------------------------------------------------------------------- - The cielabutil source code (class IODCLabUtil) is adapted from Pascal Getreuer's package for converting color representations @@ -613,3 +575,432 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------- + +Finally, DCMTK can be configured and compiled to make use of a number of +optional external libraries that, when available, provide added functionality +such as compression, encryption, or support for certain image formats. +For binary libraries and executables statically linked against these +external libraries, the following additional copyright notices / +licenses apply: + +When compiled with libiconv support: + +--------------------------------------------------------------------------- + +GNU LESSER GENERAL PUBLIC LICENSE + +License text available at: https://www.gnu.org/licenses/lgpl.html + +--------------------------------------------------------------------------- + +When compiled with libicu support: + +--------------------------------------------------------------------------- + +Copyright (C) 1991-2017 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in http://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Unicode data files and any associated documentation +(the "Data Files") or Unicode software and any associated documentation +(the "Software") to deal in the Data Files or Software +without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files +or Software are furnished to do so, provided that either +(a) this copyright and permission notice appear with all copies +of the Data Files or Software, or +(b) this copyright and permission notice appear in associated +Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT OF THIRD PARTY RIGHTS. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in these Data Files or Software without prior +written authorization of the copyright holder. + +--------------------------------------------------------------------------- + +When compiled with libpng support: + +--------------------------------------------------------------------------- + +This copy of the libpng notices is provided for your convenience. In case of +any discrepancy between this copy and the notices in the file png.h that is +included in the libpng distribution, the latter shall prevail. + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately following +this sentence. + +This code is released under the libpng license. + +libpng versions 1.0.7, July 1, 2000 through 1.6.29, March 16, 2017 are +Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are +derived from libpng-1.0.6, and are distributed according to the same +disclaimer and license as libpng-1.0.6 with the following individuals +added to the list of Contributing Authors: + + Simon-Pierre Cadieux + Eric S. Raymond + Mans Rullgard + Cosmin Truta + Gilles Vollant + James Yu + Mandar Sahastrabuddhe + Google Inc. + Vadim Barkov + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. + +Some files in the "contrib" directory and some configure-generated +files that are distributed with libpng have other copyright owners and +are released under other open source licenses. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from +libpng-0.96, and are distributed according to the same disclaimer and +license as libpng-0.96, with the following individuals added to the list +of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, +and are distributed according to the same disclaimer and license as +libpng-0.88, with the following individuals added to the list of +Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +Some files in the "scripts" directory have other copyright owners +but are released under this license. + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + + 1. The origin of this source code must not be misrepresented. + + 2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + + 3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. + +END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. + +TRADEMARK: + +The name "libpng" has not been registered by the Copyright owner +as a trademark in any jurisdiction. However, because libpng has +been distributed and maintained world-wide, continually since 1995, +the Copyright owner claims "common-law trademark protection" in any +jurisdiction where common-law trademark is recognized. + +OSI CERTIFICATION: + +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is +a certification mark of the Open Source Initiative. OSI has not addressed +the additional disclaimers inserted at version 1.0.7. + +EXPORT CONTROL: + +The Copyright owner believes that the Export Control Classification +Number (ECCN) for libpng is EAR99, which means not subject to export +controls or International Traffic in Arms Regulations (ITAR) because +it is open source, publicly available software, that does not contain +any encryption software. See the EAR, paragraphs 734.3(b)(3) and +734.7(b). + +Glenn Randers-Pehrson +glennrp at users.sourceforge.net +March 16, 2017 + +--------------------------------------------------------------------------- + +When compiled with libsndfile support: + +--------------------------------------------------------------------------- + +GNU LESSER GENERAL PUBLIC LICENSE + +License text available at: https://www.gnu.org/licenses/lgpl.html + +--------------------------------------------------------------------------- + +When compiled with libtiff support: + +--------------------------------------------------------------------------- + +Copyright (c) 1988-1997 Sam Leffler +Copyright (c) 1991-1997 Silicon Graphics, Inc. + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, provided +that (i) the above copyright notices and this permission notice appear in +all copies of the software and related documentation, and (ii) the names of +Sam Leffler and Silicon Graphics may not be used in any advertising or +publicity relating to the software without the specific, prior written +permission of Sam Leffler and Silicon Graphics. + +THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR +ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF +LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +OF THIS SOFTWARE. + +--------------------------------------------------------------------------- + +When compiled with libwrap support: + +--------------------------------------------------------------------------- + +/************************************************************************ +* Copyright 1995 by Wietse Venema. All rights reserved. Some individual +* files may be covered by other copyrights. +* +* This material was originally written and compiled by Wietse Venema at +* Eindhoven University of Technology, The Netherlands, in 1990, 1991, +* 1992, 1993, 1994 and 1995. +* +* Redistribution and use in source and binary forms are permitted +* provided that this entire copyright notice is duplicated in all such +* copies. +* +* This software is provided "as is" and without any expressed or implied +* warranties, including, without limitation, the implied warranties of +* merchantibility and fitness for any particular purpose. +************************************************************************/ + +--------------------------------------------------------------------------- + +When compiled with libxml support: + +--------------------------------------------------------------------------- + +The MIT License + +License text available at: +https://opensource.org/licenses/mit-license.html + +--------------------------------------------------------------------------- + +When compiled with openssl support: + +--------------------------------------------------------------------------- + + The OpenSSL toolkit stays under a double license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2017 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + +--------------------------------------------------------------------------- + +When compiled with zlib support: + +--------------------------------------------------------------------------- + + (C) 1995-2017 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +If you use the zlib library in a product, we would appreciate *not* receiving +lengthy legal documents to sign. The sources are provided for free but without +warranty of any kind. The library has been entirely written by Jean-loup +Gailly and Mark Adler; it does not include third-party code. + +If you redistribute modified sources, we would appreciate that you include in +the file ChangeLog history information documenting your changes. Please read +the FAQ for more information on the distribution of modified source versions. + +--------------------------------------------------------------------------- diff --git a/CREDITS b/CREDITS index b83ff574..851b8353 100644 --- a/CREDITS +++ b/CREDITS @@ -5,6 +5,9 @@ We would like to thank the following individuals, companies and organizations (in alphabetical order) for supporting the development and maintenance of the Open Source DICOM Toolkit DCMTK: +Carl Zeiss Meditec: The preparation and publication of the DCMTK 3.6.2 release + as well as several extensions in wlmscpfs and dcmqrscp were supported by + funding from Carl Zeiss Meditec AG (Muenchen, Germany). DKFZ: The work on the DCMTK module "dcmrt" was supported in part by funding from the Deutsches Krebsforschungszentrum (Heidelberg, Germany). @@ -55,4 +58,4 @@ YXLON: The work on the initial version of the DICONDE data dictionary was Please note that this list does not claim to be exhaustive. Just send us an email if you think that you or your company/organization should also be listed. -DCMTK Team, 2017-01-31 +DCMTK Team, 2017-04-20 diff --git a/INSTALL b/INSTALL index 4cdf279c..8f95525a 100644 --- a/INSTALL +++ b/INSTALL @@ -1,35 +1,21 @@ - ================================== DICOM TOOLKIT (DCMTK) INSTALLATION ================================== -------------------------------------------------------------------------------- - IMPORTANT NOTE FOR SNAPSHOT AND CURRENT DEVELOPMENT VERSION 3.6.1_DEV -------------------------------------------------------------------------------- - Please note that most sections of this document refer to the official release - DCMTK 3.6.0, i.e. they are not yet updated for the changes of the latest - development version 3.6.1. This will be done for the next release, which will - probably be called version 3.6.2. - - The toolkit should compile on Linux systems with gcc 4.7.2 to 4.9.2 since - this is our main development platform. Also on Windows systems, it usually - works with VisualStudio 2008 to 2013. However, there is no guarantee that - the software also compiles on your system. -------------------------------------------------------------------------------- - PRE-REQUISITES ============== The DICOM toolkit (DCMTK) needs to be compiled with a C++ compiler. We -recommend using the GNU C++ compiler in versions higher than 2.95 (most of the -development was done using GNU C++ 4.1.2 on Linux 2.6). The software is also -known to compile using the SUNPro C++ compiler, the Intel C++ compiler and the -Microsoft Visual C++ compiler. +recommend using the GNU C++ compiler in versions higher than 4.2.1 (most of the +development was done using GNU C++ 4.9.2 on Linux 3.16). The software is also +known to compile using the SUNPro C++ compiler, Clang and Microsoft Visual +Studio. Compatibility with other C++ compilers is unknown, however, we have tried to -keep language demands to a minimum (newer C++ features such as ANSI C++ Library, -Exceptions and RTTI have been avoided). +keep language demands to a minimum (newer C++ features such as Exceptions and +RTTI have been avoided and fall back implementations for all used STL classes +are provided). You will need several hundred Mbytes of disk space to compile all the software. @@ -41,24 +27,35 @@ Microsoft Windows ----------------- The DCMTK software can be compiled under a native Microsoft Windows environment -(see section "BUILDING (Windows)" below for more information). +(see section "Microsoft Windows with CMake" below for more information). -The current release successfully compiles on the following systems: +The current release successfully compiles on the following operating system / +hardware / compiler combinations: - Windows XP / Intel x86 / Microsoft Visual C++ 6.0 (Service Pack 6) - Windows XP / Intel x86 / Microsoft Visual C++ 2005 Standard (VS 8) - Windows XP / Intel x86 / Microsoft Visual C++ 2008 Express (VS 9) - Windows XP / Intel x86 / Microsoft Visual C++ 2010 Express (VS 10) - Windows Vista / Intel x86 / Microsoft Visual C++ 2008 Professional (VS 9) + Windows 7 / Intel x86 / Microsoft Visual C++ 2005 Express (VS 8) + Windows 7 / Intel x86 / Microsoft Visual C++ 2008 Express (VS 9) Windows 7 / Intel x86 / Microsoft Visual C++ 2010 Express (VS 10) + Windows 7 / Intel x86 / Microsoft Visual C++ 2012 Express (VS 11) + Windows 7 / Intel x86 / Microsoft Visual C++ 2013 Express (VS 12) + Windows 7 / Intel x86 / Microsoft Visual C++ 2015 Community (VS 14) + Windows 7 / Intel x86 / Microsoft Visual C++ 2017 Community (VS 15) + Windows 7 / Intel x86 / MinGW gcc 4.9.1 (i686-w64-mingw32) Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2010 Express (VS 10) - Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2010 Ultimate (VS 10) - -The dcmqrscp tool has been ported to Windows, but does not yet support -multi-processing (i.e. multiple clients concurrently) under Windows. The -worklist WWW scripts require an HTTP server and a Perl interpreter and have -not been tested under Windows (file locking interaction with the wlmscpfs -server may or may not work). + Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2012 Express (VS 11) + Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2013 Express (VS 12) + Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2015 Community (VS 14) + Windows 7 / amd64|x86_64 / Microsoft Visual C++ 2017 Community (VS 15) + Windows 7 / amd64|x86_64 / MinGW gcc 4.9.1 (x86_64-w64-mingw32) + Windows 8.1 / Intel x86 / Microsoft Visual C++ 2008 Express (VS 9) + Windows 8.1 / Intel x86 / Microsoft Visual C++ 2010 Express (VS 10) + Windows 8.1 / Intel x86 / Microsoft Visual C++ 2012 Express (VS 11) + Windows 8.1 / Intel x86 / Microsoft Visual C++ 2015 Express (VS 14) + Windows 8.1 / Intel x86 / Microsoft Visual C++ 2017 Community (VS 15) + Windows 8.1 / amd64|x86_64 / Microsoft Visual C++ 2010 Express (VS 10) + Windows 8.1 / amd64|x86_64 / Microsoft Visual C++ 2012 Express (VS 11) + Windows 8.1 / amd64|x86_64 / Microsoft Visual C++ 2015 Express (VS 14) + Windows 8.1 / amd64|x86_64 / Microsoft Visual C++ 2017 Community (VS 15) + Windows 10 / amd64|x86_64 / Microsoft Visual C++ 2015 Community (VS 14) Unix (or lookalikes) -------------------- @@ -67,123 +64,72 @@ The current DCMTK software release successfully compiles on the following operating system / hardware / compiler combinations using the instructions given below: - FreeBSD 6.4 / Intel x86 / GNU gcc 3.4.6 - FreeBSD 7.3 / Intel x86 / GNU gcc 4.2.1 - FreeBSD 8.1 / Intel x86 / GNU gcc 4.2.1 - FreeBSD 8.1 / amd64|x86_64 / GNU gcc 4.2.1 - HP-UX 10.20 / HP PA-RISC / GNU gcc 2.95.3 (see note *1,*2) - IRIX 6.3 / SGI O2 / GNU gcc 2.95.3 (see note *1) - Linux 2.4.20 / Intel x86 / GNU gcc 2.95.3 (RedHat 7.3) - Linux 2.4.21 / Intel x86 / GNU gcc 3.4.6 (CentOS 3.9) - Linux 2.6.18 / Intel x86 / GNU gcc 4.1.2 (Debian 4.0) - Linux 2.6.18 / amd64|x86_64 / Intel Compiler 11.1 (Scientific Linux 5.5) - Linux 2.6.18 / amd64|x86_64 / GNU gcc 4.1.2 (Debian 4.0) - Linux 2.6.18 / amd64|x86_64 / GNU gcc 4.5.2 (CentOS 5.5) - Linux 2.6.26 / amd64|x86_64 / GNU gcc 4.3.2 (Debian 5.0) - Linux 2.6.32 / amd64|x86_64 / GNU gcc 4.4.4 (RHEL 6.0) - Linux 2.6.34 / amd64|x86_64 / Intel Compiler 11.1 (SuSE 11.3, see note *3) - Linux 2.6.35 / amd64|x86_64 / GNU gcc 4.4.5 (Ubuntu 10.10) - MacOS X 10.4.10 / amd64|x86_64 / Apple gcc 4.0.1 (see note *10) - MacOS X 10.6.5 / amd64|x86_64 / Apple gcc 4.2.1 (see note *10) - OpenBSD 4.4 / Intel x86 / GNU gcc 3.3.5 propolice - Solaris 9 / Sun Sparc / SunPro CC 5.8 (Sun Studio 11) - Solaris 10 / Sun Sparc / SunPro CC 5.9 (Sun Studio 12u2) - Solaris 10 / Sun Sparc / GNU gcc 3.4.3 - Windows XP / Intel x86 / CygWin 1.7.7-1 (gcc 3.4.4 and 4.3.4) - Windows XP / Intel x86 / MinGW/MSys 1.0.11 (gcc 4.5.0) - -Earlier releases are known to also compile on the following platforms which -are not available to us for testing purposes any more: - - FreeBSD 4.11 / Intel x86 / GNU gcc 2.95.4 - FreeBSD 6.0 / Intel x86 / GNU gcc 3.4.4 - HP-UX 9.05 / HP PA 1.1 / GNU gcc 2.7.2.1 - IBM AIX 3.2 / RS 6000 / IBM AIX XL C++ Compiler/6000 V1.0 - IRIX 5.3 / SGI Indy / GNU gcc 2.95.2 (see note *1) - IRIX 6.5 / SGI Onyx / GNU gcc 2.95.2 (see note *4) - IRIX 6.5 / SGI Onyx / MIPSpro 7.3.1.1m (see note *4) - Linux 2.0.33 / Intel x86 / GNU gcc 2.7.2.1 - Linux 2.2.16 / IBM S/390 / GNU gcc 2.95.2 - Linux 2.2.16 / Intel x86 / GNU gcc 2.95.2 - Linux 2.4.20 / Intel x86 / GNU gcc 2.95.4, 3.2.3, 3.3.6, 3.4.5 and 4.0.3 (Debian) - Linux 2.6.1 / amd64|x86_64 / GNU gcc 4.0 (Fedora Core 4) - MacOS X 10.1.5 / Power Mac G4 / Apple gcc-934.3 (gcc 2.95.2, see note *5) - MacOS X 10.3.3 / Power Mac G4 / Apple gcc-1640 (gcc 3.3) - MacOS X 10.4.3 / Power Mac G4 / Apple gcc 4.0.1 - NetBSD 1.6.2 / Intel x86 / GNU gcc 2.95.3 - NetBSD 2.1 / Intel x86 / GNU gcc 3.3.3 - NeXTStep 3.3 / Intel x86 / NeXT/GNU gcc 2.5.8 (see note *6) - OpenBSD 3.8 / Intel x86 / GNU gcc 3.3.5 propolice - OSF/1 4.0 / DEC Alpha / Compaq C++ V6.3-002 (see note *7) - OSF/1 4.0 / DEC Alpha / GNU gcc 2.95.3 - QNX 6.2.1 / Intel x86 / GNU gcc 2.95.3 (see note *8) - Solaris 2.5.1 / Sun Sparc / GNU egcs 1.1.2 (egcs-2.91.66) - Solaris 2.5.1 / Sun Sparc / Sun SC 2.0.1 (SunPro C++ 3.0.1) - Solaris 2.5.1 / Sun Sparc / SunPro CC 4.2 - Solaris 7 / Sun Sparc / GNU gcc 2.95.3 - Solaris 7 / Sun Sparc / SunPro CC 4.2 - Solaris 8 / Sun Sparc / GNU gcc 3.2.3, 3.4 - Solaris 8 / Sun Sparc / SunPro CC 5.2 (Sun WorkShop 6 update 1) - Solaris 9 / Sun Sparc / SunPro CC 5.2 (Sun WorkShop 6 update 1) - Solaris 10 / Intel x86 / SunPro CC 5.8 (Sun Studio 11) - SunOS 4.1.3 / Sun Sparc / GNU gcc 2.7.2 - Ultrix 4.4 / DEC MIPS / GNU gcc 2.95.2 (see notes *1,*9) - Windows 9x / Intel x86 / Microsoft Visual C++ 5.0 - Windows NT 4.0 / Intel x86 / Microsoft Visual C++ 6.0 (Service Pack 6) - Windows XP / Intel x86 / Microsoft Visual C++ .NET 2003 (VS 7.1) - Windows XP / Intel x86 / CygWin 1.5.18 (gcc 3.4.4) - Windows XP / Intel x86 / MinGW/MSys 1.0.10 (gcc 3.4.2) + FreeBSD 10.1 / amd64|x86_64 / Clang 3.4.1 + Linux 4.11.9 / amd64|x86_64 / Clang 4.0.1 (Arch Linux) + Linux 4.11.9 / amd64|x86_64 / GNU gcc 7.1.1 (Arch Linux) + Linux 3.10.0 / amd64|x86_64 / Clang 3.4.2 (CentOS 7.3) + Linux 3.10.0 / amd64|x86_64 / GNU gcc 4.8.5 (CentOS 7.3) + Linux 3.16.0 / amd64|x86_64 / Clang 3.5.0 (Debian 8.8) + Linux 3.2.0 / amd64|x86_64 / GNU gcc 4.4.7 (Debian 7.11) + Linux 3.2.0 / amd64|x86_64 / GNU gcc 4.7.2 (Debian 7.11) + Linux 3.2.0 / amd64|x86_64 / GNU gcc 4.8.4 (Debian 7.11) + Linux 3.19.0 / amd64|x86_64 / Clang 3.9.1 (Linux Mint 17.3) + Linux 3.19.0 / amd64|x86_64 / GNU gcc 4.8.5 (Linux Mint 17.3) + Linux 3.19.0 / amd64|x86_64 / GNU gcc 5.4.1 (Linux Mint 17.3) + Linux 3.19.0 / amd64|x86_64 / GNU gcc 6.3.0 (Linux Mint 17.3) + Linux 4.9.0 / Intel x86 / Clang 3.8.1 (Debian 9.0) + Linux 4.9.0 / Intel x86 / GNU gcc 6.3.0 (Debian 9.0) + Linux 4.10.0 / amd64|x86_64 / GNU gcc 6.3.0 (Ubuntu 17.04) + Linux 4.10.0 / amd64|x86_64 / Clang 4.0.0 (Ubuntu 17.04) + MacOS X 14.4.0 / amd64|x86_64 / Apple Clang 6.0 + NetBSD 7.0 / amd64|x86_64 / Clang 4.0.0 + NetBSD 7.0 / amd64|x86_64 / GNU gcc 4.8.5 + OpenBSD 6.0 / amd64|x86_64 / Clang 3.8.0 + OpenBSD 6.0 / amd64|x86_64 / GNU gcc 4.2.1 + OpenIndiana / Intel x86 / Clang 4.0.0 (OpenIndiana 2017.04) + OpenIndiana / Intel x86 / GNU gcc 4.9.4 (OpenIndiana 2017.04) + QNX 6.5 / Intel x86 / GNU gcc 4.4.2 (see note *1) + Solaris 11.3 / Intel x86 / GNU gcc 4.8.2 + Solaris 11.3 / Intel x86 / SunPro CC 5.14 (Oracle Developer Studio 12.5) + Solaris 11.3 / Intel x86 / SunPro CC 5.15 (Oracle Developer Studio 12.6) + Windows 7 / amd64|x86_64 / CygWin 2.8.0 (gcc 6.3.0) + +Other Platforms +--------------- + +Earlier releases of the DCMTK are known to also compile on further platforms +which are not available to us for testing purposes any more, e.g. AIX, HP-UX, +IRIX, NeXTStep, OSF/1, Solaris/SunOS, Ultrix. Also the Intel C++ Compiler and +other compilers might still work but we haven't tested them this time. + +Cross Compiling +--------------- + +The current DCMTK release can be cross-compiled targeting the following +platforms: + + Android / arm64 / GNU gcc 4.9.2 (API 24, ABI arm64-v8a) + Windows 7 / Intel x86 / MinGW gcc 4.9.1 + Windows 7 / amd64|x86_64 / MinGW gcc 4.9.1 + +Cross compiling support with running configuration and unit tests is currently +only provided using CMake and requires the use of the Android emulator or Wine +when targeting Android or Windows respectively. Other versions of Android will +most likely also work, but the above mentioned one is currently the only one +that is being regularly tested. + +Of course, GNU Autoconf also provides cross compiling support and using it for +various platforms might also work but probably not out of the box, i.e. some +customization is needed and you have to find a way to provide the information +from the configuration tests that need to be run on the target hardware +yourself. Platform Notes -------------- -(*1) The dcmimage/dcmimgle module makes intensive use of inlined templates. - Depending on the compiler and the available virtual memory, compilation - might fail if this module is compiled with optimization. Compilation - succeeds if the optimizer and any automatic inlining of code are switched - off. For example GNU gcc might require that the -O option is removed and - -fno-default-inline is added to the CXXFLAGS setting in the file - "config/Makefile.def", which is created by configure (see below). -(*2) HP-UX 10.2 requires DCMTK to be configured with --disable-lfs, i.e. - without large file support. -(*3) Building with Intel Compiler Suite 11.1 requires GNU C++ Standard Library - version 4.3. -(*4) IRIX 6 users are recommended to consult SGI's Notes on building Open - Source software on IRIX, available from: http://freeware.sgi.com/howto.html - In short, after running configure, the following modifications are - required in "config/Makefile.def" before DCMTK can be compiled: - - remove "-lsocket -lnsl" from LIBS - On IRIX, DCMTK should be built using GNU make (gmake), not with the IRIX - specific pmake/smake/make commands. -(*5) MacOS X 10.1 requires DCMTK to be configured with --disable-threads - because certain re-entrant Posix functions such as localtime_r are not - available. -(*6) The NeXT gcc 2.5.8 compiler provides only very limited support for C++ - templates and, therefore, might fail to compile the dcmimage/dcmimgle - module ("internal compiler error"). The gcc compiler also does not - properly support the "protected" derivation of classes which is used in - the dcmsr module. However, modules and applications that were present in - earlier releases of DCMTK still compile. -(*7) Might require -O0 in order to compile "dcmsr/libsrc/dsrdoctr.cc". -(*8) The libz.so included in QNX 6.2.1 is missing the zlibVersion() - function. This will cause the DCMTK compile to fail if configured with - --with-zlib. It has already been corrected in QNX's internal cvs - repository. Earlier QNX versions (6.2.0) and future versions (6.3.x) - should work fine. As a temporary measure it is possible to link against - /usr/lib/libz.so.1 which does include that function, or to disable zlib - support in DCMTK by calling configure --without-zlib. -(*9) Requires -fpermissive when compiled with GNU gcc due to the X11R5 header - files which are not ANSI compliant. -(*10) For MacOS X 10.4 and 10.6 the OFSemaphore class is not available since it - is compiling but not working on MacOS X. The reason is that semaphores - must be named in MacOS X and thus the current implementation fails to - construct semaphores in the OFSemaphore constructor. However, the toolkit - so far does not make any use of this class. - -Please note: Due to resource limitations it is not practical for us to ensure -that the newest release of DCMTK is problem free under all the above -combinations. Currently, our main development environment is Linux 2.6 using -GNU C++ 4.1.2 and DCMTK should always compile on this platform. +(*1) QNX 6.5 requires to remove or disable the define "HAVE_IEEEFP_H" in + "config/include/dcmtk/config/osconfig.h" after running the configure + process but before starting the compilation. OPENSSL SUPPORT @@ -194,9 +140,9 @@ One", i.e. DICOM network transmission "tunneled" through a secure TLSv1 transport connection. DCMTK relies on the OpenSSL toolkit (www.openssl.org) for the underlying cryptographic routines and the TLS protocol implementation. This release of DCMTK is known to compile with the OpenSSL releases 0.9.8 to -1.0.0, although other releases may work as well. +1.1.0f, although other releases may work as well. -When using autoconf, if support for security enhancements is desired, a compiled +When using Autoconf, if support for security enhancements is desired, a compiled version of the OpenSSL libraries and include files must be available during compilation of DCMTK. By default, DCMTK checks whether OpenSSL is installed in the standard path and enables support automatically if present. @@ -216,39 +162,37 @@ ZLIB SUPPORT Starting with release 3.5.2, DCMTK supports the "Deflated Explicit VR Little Endian" Transfer Syntax, i.e. ZIP-compressed network transmission and media storage. DCMTK relies on the zlib toolkit (www.zlib.org) for the underlying -compression routines. This release of DCMTK is known to compile with the -zlib releases 1.2.3 to 1.2.5, although other releases may work as well. +compression routines. This release of DCMTK is known to compile with the zlib +releases 1.2.3 to 1.2.11, although other releases may work as well. -When using autoconf, if support for zlib compression is desired, a compiled +When using Autoconf, if support for zlib compression is desired, a compiled version of the zlib library and include files must be available during -compilation of DCMTK. By default, DCMTK checks whether zlib is installed -in the standard path and enables support automatically if present. +compilation of DCMTK. By default, DCMTK checks whether zlib is installed in +the standard path and enables support automatically if present. -When using CMake, a compiled version of the zlib libraries and include -files must be available during compilation of DCMTK. See discussion on CMake -below. +When using CMake, a compiled version of the zlib libraries and include files +must be available during compilation of DCMTK. See discussion on CMake below. LIBTIFF SUPPORT =============== -Starting with release 3.5.1, DCMTK supports the conversion of DICOM images -to TIFF. DCMTK relies on the libtiff toolkit (www.libtiff.org) for this -purpose. This release of DCMTK is known to compile with the libtiff releases -3.7.4 to 3.9.4, although other releases may work as well. However, libtiff -releases prior to version 3.7.0 will not work since the TIFFCleanup() function -was not yet available. On Windows, libtiff 3.7.4 or higher is required due to +Starting with release 3.5.1, DCMTK supports the conversion of DICOM images to +TIFF. DCMTK relies on the libtiff toolkit (www.libtiff.org) for this purpose. +This release of DCMTK is known to compile with the libtiff releases 3.7.4 to +4.0.8, although other releases may work as well. However, libtiff releases +prior to version 3.7.0 will not work since the TIFFCleanup() function was not +yet available. On Windows, libtiff 3.7.4 or higher is required due to incompatible API changes in libtiff. -When using autoconf, if support for TIFF export is desired, a compiled version +When using Autoconf, if support for TIFF export is desired, a compiled version of the libtiff libraries and include files must be available during compilation of DCMTK, and the libtiff support must be switched on explicitly. By default, DCMTK checks whether libtiff is installed in the standard path and enables support automatically if present. -When using CMake, a compiled version of the libtiff libraries and include -files must be available during compilation of DCMTK. See discussion on CMake -below. +When using CMake, a compiled version of the libtiff libraries and include files +must be available during compilation of DCMTK. See discussion on CMake below. LIBPNG SUPPORT @@ -257,14 +201,13 @@ LIBPNG SUPPORT Starting with release 3.5.3, DCMTK supports the conversion of DICOM images to PNG. DCMTK relies on the libpng toolkit (www.libpng.org) for this purpose. This release of DCMTK is known to compile with the current libpng releases -1.2.8 to 1.4.3, although other releases may work as well. +1.2.8 to 1.6.30, although other releases may work as well. -When using autoconf, if support for PNG export is desired, a compiled version of +When using Autoconf, if support for PNG export is desired, a compiled version of the libpng libraries and include files must be available during compilation of -DCMTK, and the libpng support must be switched on explicitly. By default, -DCMTK checks whether libpng is installed in the standard path and enables -support automatically if present. It should be noted that libpng requires -zlib. +DCMTK, and the libpng support must be switched on explicitly. By default, DCMTK +checks whether libpng is installed in the standard path and enables support +automatically if present. It should be noted that libpng requires zlib. When using CMake, a compiled version of the libpng libraries and include files must be available during compilation of DCMTK. See discussion on CMake @@ -277,16 +220,16 @@ LIBXML2 SUPPORT Starting with release 3.5.3, DCMTK supports the conversion of XML documents to DICOM files. DCMTK relies on the libxml2 toolkit (www.libxml.org) for this purpose. This release of DCMTK is known to compile with the libxml2 releases -2.6.26 to 2.7.7, although other releases may work as well. +2.6.26 to 2.9.4, although other releases may work as well. -When using autoconf, if support for XML import is desired, a compiled version of +When using Autoconf, if support for XML import is desired, a compiled version of the libxml2 (and possibly iconv) libraries and include files must be available during compilation of DCMTK. By default, DCMTK checks whether libxml2 is installed in the standard path and enables support automatically if present. -When using CMake, if support for XML import is desired, a compiled version -of the libxml2 (and possibly iconv) libraries and include files must be -available during compilation of DCMTK. See discussion on CMake below. +When using CMake, if support for XML import is desired, a compiled version of +the libxml2 (and possibly iconv) libraries and include files must be available +during compilation of DCMTK. See discussion on CMake below. TCP WRAPPER (LIBWRAP) SUPPORT @@ -299,29 +242,50 @@ allows to enforce host-based access control via the "/etc/hosts.deny" and "/etc/hosts.allow" configuration files. See hosts_access(5) man page for details. -When using autoconf, if support for TCP wrappers is desired, a compiled version +When using Autoconf, if support for TCP wrappers is desired, a compiled version of the libwrap library and include file must be available during compilation of DCMTK. By default, DCMTK checks whether libwrap is installed in the standard path and enables support automatically if present. +When using CMake, if support for TCP wrappers is desired, a compiled version of +the libwrap library and include file must be available during +compilation of DCMTK. See discussion on CMake below. + Since DCMTK uses the TCP wrappers from C++ code, an ANSI C compatible header file is required. The official release 7.6 of the TCP wrappers library is not ANSI C compatible and does not work with DCMTK (i.e. will not be recognized by DCMTK's configure script). However, many current Linux and BSD distributions ship with an ANSI C compatible header file. -When using CMake, TCP wrappers are currently not supported. +Character Set Conversion Support +================================ + +Starting with release 3.6.2, DCMTK supports the conversion between different +character encodings, e.g. UTF-8 and ISO Latin 1. For this purpose, DCMTK relies +on one of the following alternatives to be available for being used as the +underlying implementation: libiconv, the ICU library or the iconv functionality +included in the C standard library. + +DCMTK detects the availability of these implementations and (in case multiple +ones are available) chooses one of them automatically as follows: the libiconv +implementation is currently preferred since its integration is most mature. If +it is not available, the ICU implementation is the next best choice. Otherwise +the iconv implementation from the C standard library will be selected (if the +used C standard library provides it). This choice can be overridden via the +"--enable-charconv" argument (Autoconf) or "DCMTK_ENABLE_CHARSET_CONVERSION" +(CMake). Selecting an implementation that is not available will be ignored, +i.e. the user choice will be overridden. LIBICONV SUPPORT -================ +---------------- -Starting with release 3.6.2, DCMTK supports the conversion between different -character encodings. For this purpose, DCMTK relies on the libiconv toolkit -(www.gnu.org/s/libiconv/). This release of DCMTK is known to compile with the -libiconv release 1.14, although other releases may work as well. +The libiconv toolkit (www.gnu.org/s/libiconv/) may be used as DCMTK's underlying +character set conversion implementation. This release of DCMTK is known to +compile with the libiconv releases 1.14 to 1.15, although other releases may +work as well. -When using autoconf, if support for libiconv conversion is desired, a compiled +When using Autoconf, if support for libiconv conversion is desired, a compiled version of the libiconv library and include files must be available during compilation of DCMTK. Please note that DCMTK also needs the bundled copy of libcharset. By default, DCMTK checks whether libiconv and libcharset are @@ -331,24 +295,118 @@ When using CMake, a compiled version of the libiconv and libcharset libraries and include files must be available during compilation of DCMTK. See discussion on CMake below. +ICU SUPPORT +----------- + +DCMTK supports the International Components for Unicode (ICU) library as an +alternative to the above mentioned libiconv. This release of DCMTK is known to +compile with the ICU releases 58.2 to 59.1, although other releases may work as +well. + +The ICU may be easier to integrate on some more modern Linux distributions +(e.g. Arch Linux) and Windows than the libiconv but (due to the way it is +currently integrated) lacks support for converting the following character sets: + + ISO 2022 IR 87 + ISO 2022 IR 159 + +Furthermore, the ICU-based implementation currently does not support +transliteration. + +When using Autoconf, if support for character set conversion using ICU is +desired, a compiled version of the ICU libraries and include files must be +available during compilation of DCMTK. By default, DCMTK checks whether ICU is +installed in the standard path and enables support automatically if present. + +When using CMake, if support for character set conversion using ICU is desired, +a compiled version of the ICU libraries and include files must be available +during compilation of DCMTK. See discussion on CMake below. + +Support for iconv provided in the C standard library +---------------------------------------------------- + +DCMTK allows using the iconv implementation provided as part of the C standard +library on some platforms. Building DCMTK with this implementation may be +easier and reduce additional runtime dependencies, but this option should be +used with caution: the iconv implementations from different C standard libraries +may vary with regards to the supported character sets and functionalities. + +If possible, the libiconv implementation should be preferred. Most importantly +the iconv implementation provided by the C standard library on OpenIndiana does +not support conversion to whatever character set the terminal is currently +using, which we consider essential and, therefore, strongly suggest not to use +this implementation on OpenIndiana. + +Known Issues +------------ + +If both the iconv implementation from the C standard library and the libiconv +are available in the default search paths, the wrong might be included +independently from the user choice (--enable-charconv resp. +DCMTK_ENABLE_CHARSET_CONVERSION). + +DCMTK currently has no mechanism to force including a certain instead, +so this has to be achieved by manually modifying the include paths and/or +DCMTK's code. Some platforms (e.g. Arch Linux) even rename the +provided as part of libiconv to or the like to avoid name +collisions. In this case, the user has to modify DCMTK's source code to include +the correct file, since we currently don't provide a configuration test for it. + + +Using the native STL +==================== + +DCMTK can be configured to use the STL (Standard Template Library) features +provided by the compiler / runtime environment instead of its own fallback +implementations that are used by default. + +This can be achieved with the "--enable-stl" argument (Autoconf) or by setting +"DCMTK_ENABLE_STL" to "ON" (CMake). This will, however, not forcibly enable +using the native STL features but instead trigger running several configuration +tests for detecting whether the individual features work as expected/required +by DCMTK. It is for example known that the implementations of std::list and +std::vector provided by some versions of Visual Studio 2005 have a serious bug +that might lead to segmentation fault and std::error_code is currently not +implemented correctly on any version of Visual Studio we know about. + +It is furthermore possible to enable or disable individual STL features +independently of the setting provided by "--enable-stl" or "DCMTK_ENABLE_STL" +respectively: use "--enable-stl-", "--disable-stl-" and/or +"DCMTK_ENABLE_STL_ (ON/OFF)" as appropriate, e.g. +"--disable-stl-vector" or "-DDCMTK_ENABLE_STL_STRING=ON". + C++11 SUPPORT ============= -DCMTK can be enabled to use the C++11 STL. This is controlled by the macro -"DCMTK_USE_CXX11_STL", described in "config/docs/macros.txt" (or -"/usr/local/share/doc/dcmtk/macros.txt"). +DCMTK can be configured to use several C++11 features (e.g. move semantics, +variadic templates and the like) instead of its own workarounds and fallback +implementations. This can be achieved with the "--enable-cxx11" argument +(Autoconf) or by setting "DCMTK_ENABLE_CXX11" to "ON" (CMake). + +Enabling C++11 will change some parts of DCMTK's API, so a C++11 build of DCMTK +is potentially incompatible with a classic build of DCMTK. This setting is, +therefore, stored in "config/include/dcmtk/config/osconfig.h" and verified when +compiling DCMTK itself or any program that includes it. + +Enabling C++11 support will not forcibly enable using the C++11 features but +instead trigger running some configuration tests and only truly enable it if +all of them pass. + +Please note that this setting does not depend on enabling the STL features but +not all combinations (e.g. enabling C++11 but disabling std::string) may work. -BUILDING (Unix with autoconf) + +BUILDING (Unix with Autoconf) ============================= -GNU autoconf is used to configure the software for the hardware / operating -system you are using. You do not need to obtain GNU autoconf to compile and +GNU Autoconf is used to configure the software for the hardware / operating +system you are using. You do not need to obtain GNU Autoconf to compile and install this software. All the necessary configure scripts are included in this distribution. The configure scripts examine your system capabilities and automatically generate include files and Makefiles. -Perform the following steps from the top-level (dcmtk-3.6.0) directory to +Perform the following steps from the top-level (dcmtk-3.6.2) directory to compile and install the software: Step 1: @@ -372,26 +430,28 @@ in which OpenSSL is installed. This is usually the directory that has been used as --prefix when compiling and installing OpenSSL. For example, if you wish to enable the security enhancements, and OpenSSL is -installed in "/usr/local/apps/openssl-1.0.0", then you should start configure +installed in "/usr/local/apps/openssl-1.1.0f", then you should start configure as: - ./configure --with-opensslinc=/usr/local/apps/openssl-1.0.0 + ./configure --with-opensslinc=/usr/local/apps/openssl-1.1.0f Configure will assume that the OpenSSL include files are installed in -"/usr/local/apps/openssl-1.0.0/include" and will expect the library in -"/usr/local/apps/openssl-1.0.0/lib". Appropriate options will be passed to +"/usr/local/apps/openssl-1.1.0f/include" and will expect the library in +"/usr/local/apps/openssl-1.1.0f/lib". Appropriate options will be passed to the compiler and the linker. Support for zlib, libtiff, libpng, libxml2, libwrap and libiconv can be enabled in a similar way (in case these libraries are not installed in the standard path): - ./configure --with-libzlibinc=/usr/local/apps/zlib-1.2.5 - --with-libtiffinc=/usr/local/apps/libtiff-3.9.4 - --with-libpnginc=/usr/local/apps/libpng-1.4.3 - --with-libxmlinc=/usr/local/apps/libxml-2.7.7 + ./configure --with-libzlibinc=/usr/local/apps/zlib-1.2.11 + --with-libtiffinc=/usr/local/apps/libtiff-4.0.8 + --with-libpnginc=/usr/local/apps/libpng-1.6.30 + --with-libxmlinc=/usr/local/apps/libxml2-2.9.4 --with-libwrapinc=/usr/local/apps/tcp_wrappers-7.6 - --with-libiconvinc=/usr/local/apps/libiconv-1.14 + --with-libiconvinc=/usr/local/apps/libiconv-1.15 + + --with-libicuinc=/usr/local/apps/icu-59.1 Different configure options can be combined in any order. configure --help will print a list of all existing configure options. configure --help=short @@ -406,6 +466,20 @@ options are: --disable-lfs compile without LFS support --enable-std-includes use C++ ANSI standard includes --disable-std-includes use old C++ includes + --enable-private-tags enable private tag dictionary + --disable-private-tags don't enable private tag dictionary (default) + --enable-external-dict enable loading of external dictionary (default) + --disable-external-dict don't load external dictionary + --enable-builtin-dict enable loading of built-in dictionary + --disable-builtin-dict don't load built-in dictionary (default) + --disable-rpath do not hardcode runtime library paths + --enable-charconv=TYPE enable character set conversion support + (libiconv/libicu/stdlibc/auto=default) + --disable-charconv disable character set conversion support + --enable-cxx11 use C++11 + --disable-cxx11 do not use C++11 (default) + --enable-stl use C++ STL + --disable-stl do not use C++ STL (default) Step 2: make all @@ -443,13 +517,13 @@ following commands: This generates a new Makefile and configure script in the top-level toolkit directory. -Solving configuration and compilation problems: +Solving configuration and compilation problems +---------------------------------------------- The configure script might not be able to guess the correct compiler and compiler flags to use. For example, we have noticed that use of the -pedantic -flag to the GNU C++ compiler causes compilation errors on some systems (e.g. -SunOS 4.1.3) due to system include files with incorrect ANSI function -prototypes. +flag to the GNU C++ compiler causes compilation errors on some systems due to +system include files with incorrect ANSI function prototypes. You can set environment variables to initialize configure before it is called (before Step 1 above): @@ -482,20 +556,78 @@ directories. In detail, these "CMakeLists.txt" files will serve as an input to CMake which will generate suitable build files for all of DCMTK's projects from these files. +DCMTK 3.6.2 requires CMake version 2.8.3 or later. We recommend using the +latest stable release of CMake (currently version 3.8.2) since newer versions +of CMake often provide better output in case of errors and are generally easier +to use (for example by providing better support for detecting the availability +of third party libraries). If possible, use the CMake version your operating +system provides with its package manager. + More info about building the DCMTK with CMake can be found in DCMTK's wiki: http://support.dcmtk.org/wiki/dcmtk/howto/cmakeconfiguration +CMake and shared libraries +-------------------------- + +The CMake build system allows for building shared libraries instead of static +libraries. On Windows systems, these are dynamic link libraries (.dll). +On Unix systems, these are shared objects (.so). To enable this, set the +"BUILD_SHARED_LIB" option to "ON". + +Additionally, it is possible to produce a single shared library for the whole +toolkit. This mode is controlled by the "BUILD_SINGLE_SHARED_LIBRARY" option. +If you don't want the whole toolkit in a single shared library, the +"DCMTK_MODULES" cache variable can be modified to select a subset of the +available modules. Please note that this option is marked as advanced and thus +is hidden by default. Also, when building a single shared library, applications +and tests cannot be built. + +Default value for CMAKE_BUILD_TYPE +---------------------------------- + +CMAKE_BUILD_TYPE is set to value "Release" if none is specified by the +selected build file generator. For those generators that support multiple +configuration types (e.g. Debug, Release), CMAKE_CONFIGURATION_TYPES holds +possible values. For other generators, this value is empty, and for those +generators the build type is fixated by CMake and cannot be changed otherwise. +Please note that Visual Studio (seemingly) ignores CMAKE_BUILD_TYPE and always +starts off using "Debug", so you should best change it to "Release" manually +before starting the build process. + +To disable the CMAKE_BUILD_TYPE default value, set CMAKE_BUILD_TYPE to value +"None" during CMake configuration, e.g. use "-DCMAKE_BUILD_TYPE:STRING=None" +on the command line. This may be useful if the compiler flags should be +controlled manually (e.g. as defined in environment variables like CXXFLAGS) +and no CMake defaults related to the selected configuration type kick in. + +DCMTKConfig.cmake AND DCMTKTargets.cmake +---------------------------------------- + +CMake permits to write files that describe the DCMTK build configuration +(DCMTConfig.cmake) as well as all targets (executables and libraries) that have +been produced (DCMTKTargets.cmake). Those files can be utilized by external +projects by using CMake's find_package() mechanism in "CONFIG" mode in order to +adapt their own build configuration, and directly make use of all available +target libraries and executables. + +On systems using CMake versions equal or greater than 2.8.8, these files are +written during installation to the installation directory's subfolder "/cmake" +on Windows systems, and "/lib/cmake/dcmtk" on Unix-like systems. Additionally, +these files are written to the main directory of CMake's build tree during the +build, with all content (e.g. the include paths within DCMTConfig.cmake) +pointing to the correct values for the build tree. Thus even a DCMTK build tree +can be used by external projects that process these two files. + +On systems using CMake versions lower than 2.8.8, only a simplified +DCMTKConfig.cmake is created, which is only available in the install tree. +DCMTKTargets.cmake is not created at all. Microsoft Windows with CMake ---------------------------- -Starting with DCMTK 3.5.4, no project files for Visual Studio are provided -anymore. Project files for all supported compilers can be generated with -CMake. - -In order to be able to use CMake for configuration purposes in DCMTK, perform -the following steps to install CMake on your machine: +Using CMake is the only supported way to compile DCMTK for Windows. For being +able to do so, perform the following steps to install CMake on your machine: 1. Go to http://www.cmake.org/ to download the latest release version of CMake for Windows. @@ -503,18 +635,18 @@ the following steps to install CMake on your machine: Follow all install instructions appropriately. In order to manually configure the support for the above mentioned external -libraries (OpenSSL, zlib, libtiff, libpng, libxml2 and libiconv) through CMake, -perform the following steps: +libraries (OpenSSL, zlib, libtiff, libpng, libxml2 and libiconv or ICU) through +CMake, perform the following steps: 1. Go Start -> Programs -> CMake -> "CMake" or "CMake (cmake-gui)" to start the CMake utility through which the configuration can be done. 2. In the entry field "Where is the source code:" enter the directory in which - the DCMTK source code resides, e.g. "C:\dcmtk-3.6.0". + the DCMTK source code resides, e.g. "C:\dcmtk-3.6.2". 3. In the entry field "Where to build the binaries:" enter the directory in - which the libraries and binaries are to be built, e.g. "C:\dcmtk-bin". + which the libraries and binaries are to be built, e.g. "C:\dcmtk-msvc15". 4. In the combobox "Build for:" or "Specify the generator for this project:" select the corresponding development environment which shall be used to - compile DCMTK. + compile DCMTK (e.g. "Visual Studio 15 2017 Win64"). 5. Go "Configure". (CMake will look for a corresponding compiler, read in all of DCMTK's "CMakeLists.txt" files and perform some tests. The variables in the tabular area will be displayed in red. These variables can now be set @@ -523,28 +655,28 @@ perform the following steps: example, in order to turn on libxml2 support, set the value of variable "DCMTK_WITH_XML" to "ON" and set the value of variable "WITH_LIBXMLINC" to the path where the include files and libraries of libxml2 can be found, - e.g. "C:\libxml2-2.7.7". The support of all other external libraries can + e.g. "C:\libxml2-2.9.4". The support of all other external libraries can be turned on in a similar way: libpng support: set "DCMTK_WITH_PNG" to "ON" and - set "WITH_LIBPNGINC" e.g. to "C:\libpng-1.4.2" + set "WITH_LIBPNGINC" e.g. to "C:\libpng-1.6.30" libtiff support: set "DCMTK_WITH_TIFF" to "ON" and - set "WITH_LIBTIFFINC" e.g. to "C:\tiff-3.9.2" + set "WITH_LIBTIFFINC" e.g. to "C:\libtiff-4.0.8" OpenSSL support: set "DCMTK_WITH_OPENSSL" to "ON" and - set "WITH_OPENSSLINC" e.g. to "C:\openssl-1.0.0" + set "WITH_OPENSSLINC" e.g. to "C:\openssl-1.1.0f" zlib support: set "DCMTK_WITH_ZLIB" to "ON" and - set "WITH_ZLIBINC" e.g. to "C:\zlib-1.2.5" + set "WITH_ZLIBINC" e.g. to "C:\zlib-1.2.11" libiconv support: set "DCMTK_WITH_ICONV" to "ON" and - set "WITH_LIBICONVINC" e.g. to "C:\libiconv-1.14" + set "WITH_LIBICONVINC" e.g. to "C:\libiconv-1.15" In order to turn the support of a certain external library off, set the value of the corresponding variable ("DCMTK_WITH_XML", "DCMTK_WITH_PNG", @@ -556,46 +688,53 @@ perform the following steps: specified in "WITH_LIBXMLINC", "WITH_LIBPNGINC", "WITH_LIBTIFFINC", "WITH_OPENSSLINC", "WITH_ZLIBINC" or "WITH_LIBICONVINC".) - (Please note also that the library files of all external libraries are - always expected in directory named "lib" below the directory which is - specified in "WITH_LIBXMLINC", "WITH_LIBPNGINC", "WITH_LIBTIFFINC", - "WITH_OPENSSLINC", "WITH_ZLIBINC" or "WITH_LIBICONV". Moreover, note that - the following filenames must be used for the corresponding lib files: + (Please note also that the library files of all external libraries are always + expected in directory named "lib" below the directory which is specified in + "WITH_LIBXMLINC", "WITH_LIBPNGINC", "WITH_LIBTIFFINC", "WITH_OPENSSLINC", + "WITH_ZLIBINC" or "WITH_LIBICONV". Moreover, note that the following + filenames must be used for the corresponding lib files: libxml2: - "iconv_d.lib" - debug version - "iconv_o.lib" - release version (optimized) - "libxml2_d.lib" - debug version - "libxml2_o.lib" - release version (optimized) + "iconv_d.lib" - debug version + "iconv_o.lib" - release version (optimized) + "libxml2_d.lib" - debug version + "libxml2_o.lib" - release version (optimized) libpng: - "libpng_d.lib" - debug version - "libpng_o.lib" - release version (optimized) + "libpng_d.lib" - debug version + "libpng_o.lib" - release version (optimized) libtiff: - "libtiff_d.lib" - debug version - "libtiff_o.lib" - release version (optimized) + "libtiff_d.lib" - debug version + "libtiff_o.lib" - release version (optimized) openssl: - "libeay32_d.lib" - debug version - "libeay32_o.lib" - release version (optimized) - "ssleay32_d.lib" - debug version - "ssleay32_o.lib" - release version (optimized) + "dcmtkcrypto_d.lib" - debug version + "dcmtkcrypto_o.lib" - release version (optimized) + "dcmtkssl_d.lib" - debug version + "dcmtkssl_o.lib" - release version (optimized) zlib: - "zlib_d.lib" - debug version - "zlib_o.lib" - release version (optimized) + "zlib_d.lib" - debug version + "zlib_o.lib" - release version (optimized) libiconv: - "libiconv_d.lib" - debug version - "libiconv_o.lib" - release version (optimized) - "libchset_d.lib" - debug version - "libchset_o.lib" - release version (optimized) + "libiconv_d.lib" - debug version + "libiconv_o.lib" - release version (optimized) + "libchset_d.lib" - debug version + "libchset_o.lib" - release version (optimized) + + The ICU is integrated using CMake's "find_package()" mechanism, which is + somewhat different to the handmade scripts employed for the other libraries. + If you want to use the ICU instead of libiconv, you have to include it by + setting the appropriate variables for the "FindICU" module, see + https://cmake.org/cmake/help/latest/module/FindICU.html . The debug versions of all libraries must be compiled for the multithread debug version of the runtime (/MTd), the release version must be compiled for the non-debug multithread runtime (/MT). Precompiled versions of all libraries can be downloaded from http://dicom.offis.de/dcmtk#lib-win.) + 7. Go "Configure" a second time. (CMake will adjust the configuration according to the displayed specifications.) 8. Go "OK" or "Generate". (CMake will generate new project files in the @@ -623,14 +762,7 @@ Known limitations of DCMTK on the Windows platform. 1. The dcmqrscp tool cannot spark multiple processes. Every association must be handled completely before a new association is possible. -2. On Windows 95, dcmqrscp always uses exclusive file locking (the LockFileEx - API call is available on Windows NT only). This is no problem if only a - single process exists. -3. Most applications will only work if the computer has configured TCP/IP, a - network name and a TCP/IP address. If SLIP or PPP is used the applications - can only work if a connection to a provider exists (since the IP addresses - and hostnames are given dynamically). -4. Visual C++ contains two different implementations of I/O streams which +2. Visual C++ contains two different implementations of I/O streams which should never be mixed within one application because this may cause application errors that are hard to find. The old, now deprecated implementation uses the traditional cfront header files etc. @@ -638,13 +770,7 @@ Known limitations of DCMTK on the Windows platform. DCMTK can be configured to use either of the two interfaces. This behavior can be changed in "config/include/dcmtk/config/osconfig.h" in the build directory where the symbol USE_STD_CXX_INCLUDES is declared. - - NOTE: Previous releases of DCMTK (3.5.1 and older) used the old interface - when compiled with Visual C++ 6.0. When updating software that uses - DCMTK as a library, make sure that the use of the iostream library is - consistent throughout the complete application! - -5. DCMTK does not compile when UNICODE or _UNICODE is defined because the +3. DCMTK does not compile when UNICODE or _UNICODE is defined because the VisualStudio compiler then uses the Unicode version instead of the ANSI version for all Windows API functions (i.e. type wchar_t instead of char for all character string parameters and return values). @@ -653,73 +779,39 @@ Known limitations of DCMTK on the Windows platform. Unix with CMake --------------- -Starting with DCMTK 3.6.0, CMake can also be used for non-Windows systems. - -NOTE: This is not (yet) the recommended way since this mechanism is not as - mature and stable as the above described approach using GNU autoconf. - Please feel free to test it and report any issue. Due to this, it is only - sparsely documented. See the previous section on building the DCMTK with - CMake on Windows platforms, but note that details may differ. - - -CMake and shared libraries --------------------------- - -The CMake build system allows building shared libraries instead of static -libraries. On Windows systems, these are dynamic link libraries (.dll). -On Unix systems, these are shared objects (.so). To enable this, set the -"BUILD_SHARED_LIB" option to "ON". - -Additionally, it is possible to produce a single shared library for the whole -toolkit. This mode is controlled by the "BUILD_SINGLE_SHARED_LIBRARY" option. -If you don't want the whole toolkit in a single shared library, the -"DCMTK_MODULES" cache variable can be modified to select a subset of the -available modules. Please note that this option is marked as advanced and thus -is hidden by default. Also, when building a single shared library, applications -and tests cannot be built. - -Please note that support for shared libraries is still pretty new in DCMTK and -thus not that mature. - - -Default value for CMAKE_BUILD_TYPE ----------------------------------- - -CMAKE_BUILD_TYPE is set to value "Release" if none is specified by the -selected build file generator. For those generators that support multiple -configuration types (e.g. Debug, Release), CMAKE_CONFIGURATION_TYPES holds -possible values. For other generators this value is empty, and for those -generators the build type is controlled at CMake time by CMAKE_BUILD_TYPE. - -To disable the CMAKE_BUILD_TYPE default value, set CMAKE_BUILD_TYPE to value -"None" during CMake configuration, e.g. use "-DCMAKE_BUILD_TYPE:STRING=None" -on the command line. This may be useful if the compiler flags should be -controlled manually (e.g. as defined in environment variables like CXXFLAGS) -and no CMake defaults related to the selected configuration type kick in. - - -DCMTKConfig.cmake AND DCMTKTargets.cmake ----------------------------------------- - -CMake permits to write files that describe the DCMTK build configuration -(DCMTConfig.cmake) as well as all targets (executables and libraries) that have -been produced (DCMTKTargets.cmake). Those files can be utilized by external -projects by using CMake' find_package() mechanism in "CONFIG" mode in order to -adapt their own build configuration, and directly make use of all available -target libraries and executables. - -On systems using CMake versions equal or greater than 2.8.8, these files are -written during installation to the installation directory's subfolder -/cmake on Windows systems, and /lib/cmake/dcmtk on Unix-like systems. -Additionally, these files are already written to the main directory of CMake's -build tree during the build, with all content (e.g. the include paths within -DCMTConfig.cmake) pointing to the correct values for the build tree. Thus even -a DCMTK build tree can be used by external projects that process these two -files. - -On systems using CMake versions lower than 2.8.8, only a simplified -DCMTKConfig.cmake is created, which is only available in the install tree. -DCMTKTargets.cmake is not created at all. +We have polished our CMake configuration for DCMTK release 3.6.2 and consider +it a full replacement for Autoconf that should be compatible or provide even +better support on some platforms (e.g. Android). + +One key difference when using CMake for building on Unix like systems is that we +use the "find_package()" mechanism for all external libraries and not just the +ICU. Most Unix like systems provide a package manager or even if not at least +have a consistent approach for where the libraries and include files are +installed such that the CMake "find_package()" mechanism typically finds them +out of the box. + +If that does not work or you want to use a different version of a library than +the one in the default search paths, you should look at the documentation of the +respective "find_package()" module to find out which variables need to be +modified, e.g. "FindZLIB" to control which version of the zlib will be used: +https://cmake.org/cmake/help/latest/module/FindZLIB.html . + +The typical way to build DCMTK on Unix like systems with CMake is as follows +(if not using the GUI, in that case look at the description for Windows above): + + mkdir dcmtk-gcc-`g++ -dumpversion` + cd dcmtk-gcc- + cmake ../dcmtk-3.6.2 + make -j8 + make DESTDIR=../dcmtk-3.6.2-install install + +The above commands assume that the DCMTK source code was extracted to the +current working directory into a folder named dcmtk-3.6.2 and that the GNU gcc +compiler will be used (note that clang++ -dumpversion will give wrong results). +DCMTK will be configured using CMake with the default options, detecting and +including all available support libraries and then compiled using eight CPU +cores (adjust as needed). The result will be installed to the directory +"dcmtk-3.6.2-install" next to the source code directory. HTML DOCUMENTATION AND MAN PAGES @@ -728,16 +820,16 @@ HTML DOCUMENTATION AND MAN PAGES Most DCMTK modules have been documented with Doxygen (www.doxygen.org), a free source code documentation system similar to Javadoc. Unix users who have Doxygen installed can create a hypertext documentation with "make html" in the -"dcmtk-3.6.0" or "doxygen" directory; Windows and other CMake users should +"dcmtk-3.6.2" or "doxygen" directory; Windows and other CMake users should build the "DOXYGEN" subproject. A project file for Microsoft's HTML Help Workshop can also be generated allowing to create a single CHM file (compressed HTML) from the documentation. Other output formats (e.g. LaTeX) can be enabled by changing the configuration file in the "doxygen" directory. -At the current time, dcmimage, dcmimgle, dcmjpeg, dcmpstat, dcmrt, dcmsign, -dcmsr, dcmtls, dcmwlm and ofstd are completely documented, dcmdata, dcmjpls, -dcmnet and oflog are almost completely documented. See FAQ entry: "Where is -rest of the documentation?" +At the current time, dcmfg, dcmiod, dcmimage, dcmimgle, dcmjpeg, dcmpmap, +dcmpstat, dcmrt, dcmseg, dcmsign, dcmsr, dcmtls, dcmtract, dcmwlm and ofstd are +completely documented; dcmdata, dcmjpls, dcmnet and oflog are almost completely +documented. See FAQ entry: "Where is rest of the documentation?" On Unix platforms, man pages for all command line tools are installed during the "make install" step. In order to use them, just add the directory (e.g. @@ -765,17 +857,20 @@ RUNNING THE TEST SUITE ====================== DCMTK comes with a test suite that verifies that the toolkit works as expected. -The tests are contained in a module's "tests" subdirectory. +The tests are contained in a module's "tests" subdirectory. Some tests are +marked as exhaustive and are only run if explicitly enabled, see below. When using configure for building DCMTK, all tests can be run via "make check". If a test fails, make will stop and the failure reason of the test which failed -should be visible. +should be visible. Additionally, you may run the exhaustive unit tests by +typing "make check-exhaustive". You can also run the test suite with CMake. However, the steps needed for running the test suite depend on the generator used. The Visual Studio generators will create a "RUN_TESTS" subproject. Building this project will call CTest and run all tests. When using the Makefile generator, "make test" -runs the test suite. Other generators should use a similar approach. +runs the test suite. Additionally, you may run the exhaustive unit tests by +typing "make test-exhaustive". Other generators should use a similar approach. For closer inspection, individual tests can be run directly. The Makefiles will build the test runner for each module as "/tests/tests". CMake @@ -787,7 +882,7 @@ For more information, call this program with the --help option. Have fun. -M. Eichelberg, J. Riesmeier, M. Onken, U. Schlachter, J. Schlamelcher +M. Eichelberg, J. Riesmeier, M. Onken, J. Schlamelcher DCMTK Development Team, Oldenburg, Germany. -Last revised: 2015-09-18 (Riesmeier) +Last revised: 2017-07-14 (Schlamelcher) diff --git a/VERSION b/VERSION index a2f470fd..b7276283 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.6.1_20170228 +3.6.2 diff --git a/config/Makefile.def.in b/config/Makefile.def.in index b5edc496..fe1b0f58 100644 --- a/config/Makefile.def.in +++ b/config/Makefile.def.in @@ -52,7 +52,8 @@ DEBUG = @DEBUG@ # # We want the old behavior of OFString(NULL) for now, no crashes. -GLOBALDEFS = @DEFS@ -DDCMTK_BUILD_DATE=\"2017-02-28\" -DUSE_NULL_SAFE_OFSTRING -DDCMTK_BUILD_IN_PROGRESS +GLOBALDEFS = @DEFS@ -DUSE_NULL_SAFE_OFSTRING -DDCMTK_BUILD_IN_PROGRESS +# -DDCMTK_BUILD_DATE=\"YYYY-MM-DD\" # # ARCH defines special machine architecture compiler settings diff --git a/config/Makefile.in b/config/Makefile.in index 429aa042..ad1e5111 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -63,7 +63,7 @@ distclean: include/dcmtk/config/arith.h: arith ./arith $@ -arith: arith.cc - $(CXX) $(CXXFLAGS) -Iinclude -I../ofstd/include -I../ofstd/libsrc -o$@ $@.cc +arith: tests/arith.cc + $(CXX) $(CXXFLAGS) -Iinclude -I../ofstd/include -I../ofstd/libsrc -o$@ tests/$@.cc dependencies: include/dcmtk/config/arith.h diff --git a/config/aclocal.m4 b/config/aclocal.m4 index 78e457e1..827d6098 100644 --- a/config/aclocal.m4 +++ b/config/aclocal.m4 @@ -1116,7 +1116,7 @@ fi dnl AC_INCLUDE_MATH_H_AS_CXX checks if must be included as a C++ dnl include file (i.e. without extern "C"). Some sytems (Win32, HP/UX 10) -dnl use C++ language features in +dnl use C++ language features in . dnl AC_INCLUDE_MATH_H_AS_CXX(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN(AC_INCLUDE_MATH_H_AS_CXX, @@ -1411,7 +1411,8 @@ fi dnl AC_CXX_LIBC_H_EXTERN_C checks if and cause a problem if -dnl libc.h is included extern "C" and math.h is not. This is the case on QNX 6.2.x +dnl libc.h is included extern "C" and math.h is not. This is the case on QNX +dnl 6.2.x and 6.5.x. AC_DEFUN([AC_CXX_LIBC_H_EXTERN_C], [AH_TEMPLATE([INCLUDE_LIBC_H_AS_CXX], [Define if libc.h should be treated as a C++ header]) @@ -1419,10 +1420,10 @@ AC_CACHE_CHECK(whether libc.h should be treated as a C++ header, ac_cv_cxx_libc_h_is_cxx, [AC_LANG_SAVE AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([#include -extern "C" { + AC_TRY_COMPILE([extern "C" { #include -}],[int i = 0], +} +#include ],[int i = 0], ac_cv_cxx_libc_h_is_cxx=no, ac_cv_cxx_libc_h_is_cxx=yes) AC_LANG_RESTORE ]) @@ -1552,7 +1553,7 @@ AC_TYPEDEF_HELPER([$1],[],[AC_DEFINE_UNQUOTED(AC_TYPEDEF_TEMP, [1], [Define `$1' # when _LARGEFILE64_SOURCE is defined # AC_DEFUN([AC_LFS64], -[ AH_TEMPLATE([HAVE_LFS_SUPPORT], [Define if LFS (large file support) is available]) +[ AH_TEMPLATE([DCMTK_ENABLE_LFS], [Select LFS mode (defined above) that shall be used or don't define it]) AH_TEMPLATE([_LARGEFILE64_SOURCE], [Define to enable LFS64 (explicit large file support) if available]) AC_MSG_CHECKING([for explicit large file support]) ac_cv_lfs64_support=no @@ -1565,7 +1566,7 @@ AC_DEFUN([AC_LFS64], if test "$ac_cv_lfs64_support" = yes; then AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_LFS_SUPPORT,, [Define if LFS (large file support) is available]) + AC_DEFINE(DCMTK_ENABLE_LFS, DCMTK_LFS64, [Select LFS mode (defined above) that shall be used or don't define it]) AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Define to enable LFS64 (explicit large file support) if available]) else AC_MSG_RESULT([no]) @@ -1648,7 +1649,7 @@ AC_DEFUN([MY_AC_SYS_LARGEFILE], fi ac_cv_lfs64_support=no - AH_TEMPLATE([HAVE_LFS_SUPPORT], [Define if LFS (large file support) is available]) + AH_TEMPLATE([DCMTK_ENABLE_LFS], [Select LFS mode (defined above) that shall be used or don't define it]) MY_AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, ac_cv_sys_file_offset_bits, [Number of bits in a file offset, on hosts where this is settable.], @@ -1659,7 +1660,7 @@ AC_DEFUN([MY_AC_SYS_LARGEFILE], [MY_AC_SYS_LARGEFILE_TEST_INCLUDES]) if test "$ac_cv_lfs_support" = yes; then - AC_DEFINE(HAVE_LFS_SUPPORT,, [Define if LFS (large file support) is available]) + AC_DEFINE(DCMTK_ENABLE_LFS, DCMTK_LFS, [Select LFS mode (defined above) that shall be used or don't define it]) fi ])# MY_AC_SYS_LARGEFILE @@ -1888,31 +1889,6 @@ AC_DEFUN([AC_CHECK_ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES], fi ]) -AC_DEFUN([AC_CHECK_ALIGNAS_SUPPORTS_TYPEDEFS], -[ - AC_MSG_CHECKING([whether alignas supports typedefs]) - AC_LINK_IFELSE( - [ - AC_LANG_SOURCE( - [ - int main() - { - typedef char type[[16]] alignas(4); - return 0; - } - ]) - ], - [dcmtk_alignas_supports_typedefs=[yes]], - [dcmtk_alignas_supports_typedefs=[no]] - ) - if test "$dcmtk_alignas_supports_typedefs" = yes; then - AC_MSG_RESULT([yes]) - AC_DEFINE($1,[1],[Define if alignas supports typedefs]) - else - AC_MSG_RESULT([no]) - fi -]) - AC_DEFUN([AC_CHECK_DEFAULT_CONSTRUCTOR_DETECTION_VIA_SFINAE], [ AC_MSG_CHECKING([whether the compiler supports default constructor detection via SFINAE]) diff --git a/config/configure b/config/configure index 61c03887..0518b650 100755 --- a/config/configure +++ b/config/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for dcmtk 3.6.1. +# Generated by GNU Autoconf 2.69 for dcmtk 3.6.2. # # Report bugs to . # @@ -579,9 +579,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dcmtk' -PACKAGE_TARNAME='dcmtk-3.6.1' -PACKAGE_VERSION='3.6.1' -PACKAGE_STRING='dcmtk 3.6.1' +PACKAGE_TARNAME='dcmtk-3.6.2' +PACKAGE_VERSION='3.6.2' +PACKAGE_STRING='dcmtk 3.6.2' PACKAGE_BUGREPORT='bugs@dcmtk.org' PACKAGE_URL='http://www.dcmtk.org/' @@ -634,6 +634,7 @@ MATHLIBS PNGLIBS TIFFLIBS OPENSSLLIBS +HAVE_CXX11 CHARCONVLIBS CHARCONVINCLUDES ICU_CONFIG @@ -743,7 +744,19 @@ with_libiconv with_libicuinc with_libicu enable_charconv -with_cxx11_stl +enable_cxx11 +enable_stl +enable_stl_vector +enable_stl_algorithm +enable_stl_limits +enable_stl_list +enable_stl_map +enable_stl_memory +enable_stl_stack +enable_stl_string +enable_stl_type_traits +enable_stl_tuple +enable_stl_system_error ' ac_precious_vars='build_alias host_alias @@ -1298,7 +1311,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dcmtk 3.6.1 to adapt to many kinds of systems. +\`configure' configures dcmtk 3.6.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1363,7 +1376,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dcmtk 3.6.1:";; + short | recursive ) echo "Configuration of dcmtk 3.6.2:";; esac cat <<\_ACEOF @@ -1389,6 +1402,36 @@ Optional Features: --enable-charconv=TYPE enable character set conversion support (libiconv/libicu/stdlibc/auto=default) --disable-charconv disable character set conversion support + --enable-cxx11 use C++11 + --disable-cxx11 do not use C++11 (default) + --enable-stl use C++ STL + --disable-stl do not use C++ STL (default) + --enable-stl-vector use C++ STL vector + --disable-stl-vector do not use C++ STL vector + --enable-stl-algorithm use C++ STL algorithm + --disable-stl-algorithm do not use C++ STL algorithm + --enable-stl-limits use C++ STL limits + --disable-stl-limits do not use C++ STL limits + --enable-stl-list use C++ STL list + --disable-stl-list do not use C++ STL list + --enable-stl-map use C++ STL map + --disable-stl-map do not use C++ STL map + --enable-stl-memory use C++ STL memory + --disable-stl-memory do not use C++ STL memory + --enable-stl-stack use C++ STL stack + --disable-stl-stack do not use C++ STL stack + --enable-stl-string use C++ STL string + --disable-stl-string do not use C++ STL string + --enable-stl-type-traits + use C++ STL type-traits + --disable-stl-type-traits + do not use C++ STL type-traits + --enable-stl-tuple use C++ STL tuple + --disable-stl-tuple do not use C++ STL tuple + --enable-stl-system-error + use C++ STL system_error + --disable-stl-system_error + do not use C++ STL system_error Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1421,8 +1464,6 @@ Optional Packages: --with-libicuinc=DIR location of libicu includes and libraries --with-libicu include libicu support (default: auto) --without-libicu don't include libicu support - --with-cxx11-stl enable C++11 STL - --without-cxx11-stl disable C++11 STL (default) Some influential environment variables: CC C compiler command @@ -1504,7 +1545,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dcmtk configure 3.6.1 +dcmtk configure 3.6.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2364,7 +2405,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dcmtk $as_me 3.6.1, which was +It was created by dcmtk $as_me 3.6.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2715,12 +2756,80 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers include/dcmtk/config/osconfig.h" + + +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) +# +# DESCRIPTION +# +# Check for baseline language coverage in the compiler for the specified +# version of the C++ standard. If necessary, add switches to CXX and +# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard) +# or '14' (for the C++14 standard). +# +# The second argument, if specified, indicates whether you insist on an +# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. +# -std=c++11). If neither is specified, you get whatever works, with +# preference for an extended mode. +# +# The third argument, if specified 'mandatory' or if left unspecified, +# indicates that baseline support for the specified C++ standard is +# required and that the macro should error out if no mode with that +# support is found. If specified 'optional', then configuration proceeds +# regardless, after defining HAVE_CXX${VERSION} if and only if a +# supporting mode is found. +# +# LICENSE +# +# Copyright (c) 2008 Benjamin Kosnik +# Copyright (c) 2012 Zack Weinberg +# Copyright (c) 2013 Roy Stogner +# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov +# Copyright (c) 2015 Paul Norman +# Copyright (c) 2015 Moritz Klammler +# Copyright (c) 2016 Krzesimir Nowak +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + + + + + + + + + + + + + + + + + + + + -PACKAGE_VERSION_NUMBER=361 + + + +PACKAGE_VERSION_NUMBER=362 PACKAGE_VERSION_SUFFIX="" -PACKAGE_DATE="DEV" +PACKAGE_DATE="2017-07-14" cat >>confdefs.h <<_ACEOF @@ -5936,7 +6045,7 @@ _ACEOF fi done -for ac_func in uname cuserid getlogin +for ac_func in uname cuserid getlogin getlogin_r do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -6112,6 +6221,17 @@ _ACEOF fi done +for ac_func in readdir_r +do : + ac_fn_c_check_func "$LINENO" "readdir_r" "ac_cv_func_readdir_r" +if test "x$ac_cv_func_readdir_r" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_READDIR_R 1 +_ACEOF + +fi +done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } if ${ac_cv_sys_largefile_source+:} false; then : @@ -8587,10 +8707,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include extern "C" { #include } +#include int main () { @@ -8995,6 +9115,10 @@ $as_echo "#define HAVE_PTHREAD_RWLOCK /**/" >>confdefs.h ;; *-*-netbsdelf2*) ;; + *-*-netbsd*) + CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CXXFLAGS" + CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CFLAGS" + ;; *-*-darwin*) CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS" CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS" @@ -9046,6 +9170,10 @@ $as_echo "#define HAVE_PTHREAD_RWLOCK /**/" >>confdefs.h ;; *-*-netbsdelf2*) ;; + *-*-netbsd*) + CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CXXFLAGS" + CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CFLAGS" + ;; *-*-darwin*) CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS" CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS" @@ -9144,7 +9272,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -$as_echo "#define HAVE_LFS_SUPPORT /**/" >>confdefs.h +$as_echo "#define DCMTK_ENABLE_LFS DCMTK_LFS64" >>confdefs.h $as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h @@ -9364,7 +9492,7 @@ rm -f conftest* if test "$ac_cv_lfs_support" = yes; then -$as_echo "#define HAVE_LFS_SUPPORT /**/" >>confdefs.h +$as_echo "#define DCMTK_ENABLE_LFS DCMTK_LFS" >>confdefs.h fi @@ -9892,6 +10020,69 @@ $as_echo "$ac_cv_have___func___macro" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking prototype for feenableexcept (in fenv.h)" >&5 +$as_echo_n "checking prototype for feenableexcept (in fenv.h)... " >&6; } + +: + +ac_includes="" +for ac_header in fenv.h +do + ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then + ac_includes="$ac_includes +#include<$ac_header>" + fi +done +tmp_save_1=`echo feenableexcept | tr ' :' '__'` +if eval \${ac_cv_prototype_$tmp_save_1+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __cplusplus +extern "C" { +#endif +$ac_includes +#ifdef __cplusplus +} +#endif +typedef union { int member; } dummyStruct; +#ifdef __cplusplus +extern "C" +#endif +dummyStruct feenableexcept(dummyStruct); + + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "ac_cv_prototype_$tmp_save_1=no" +else + eval "ac_cv_prototype_$tmp_save_1=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'` + cat >>confdefs.h <<_ACEOF +#define $ac_tr_prototype 1 +_ACEOF + + : +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking prototype for _stricmp (in string.h)" >&5 $as_echo_n "checking prototype for _stricmp (in string.h)... " >&6; } @@ -10841,6 +11032,69 @@ extern "C" dummyStruct gethostbyname_r(dummyStruct); +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "ac_cv_prototype_$tmp_save_1=no" +else + eval "ac_cv_prototype_$tmp_save_1=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'` + cat >>confdefs.h <<_ACEOF +#define $ac_tr_prototype 1 +_ACEOF + + : +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking prototype for gethostbyaddr_r (in libc.h unistd.h stdlib.h netdb.h)" >&5 +$as_echo_n "checking prototype for gethostbyaddr_r (in libc.h unistd.h stdlib.h netdb.h)... " >&6; } + +: + +ac_includes="" +for ac_header in libc.h unistd.h stdlib.h netdb.h +do + ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then + ac_includes="$ac_includes +#include<$ac_header>" + fi +done +tmp_save_1=`echo gethostbyaddr_r | tr ' :' '__'` +if eval \${ac_cv_prototype_$tmp_save_1+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __cplusplus +extern "C" { +#endif +$ac_includes +#ifdef __cplusplus +} +#endif +typedef union { int member; } dummyStruct; +#ifdef __cplusplus +extern "C" +#endif +dummyStruct gethostbyaddr_r(dummyStruct); + + int main () { @@ -12595,6 +12849,7 @@ fi fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use C++ standard includes" >&5 $as_echo_n "checking whether to use C++ standard includes... " >&6; } ac_use_std_includes="auto" @@ -12656,7 +12911,7 @@ if ${ac_cv_check_std_namespace+:} false; then : else ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5' cat > conftest.$ac_ext < @@ -13128,7 +13383,7 @@ if ${ac_cv_check_class_template+:} false; then : else ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5' cat > conftest.$ac_ext < @@ -13200,7 +13455,7 @@ if ${ac_cv_check_static_template_method+:} false; then : else ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5' cat > conftest.$ac_ext < conftest.$ac_ext < @@ -14367,6 +14622,7 @@ if test "${LIBXMLCFLAGS+set}" = set; then CXXFLAGS="$LIBXMLCFLAGS $CXXFLAGS" CFLAGS="$LIBXMLCFLAGS $CFLAGS" fi +LIBXMLLIBS=`xml2-config --libs 2>/dev/null` XMLLIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libxml support" >&5 @@ -14381,7 +14637,7 @@ $as_echo "yes" >&6; } $as_echo "#define WITH_LIBXML /**/" >>confdefs.h - XMLLIBS="-lxml2" + XMLLIBS=$LIBXMLLIBS ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -14390,7 +14646,7 @@ $as_echo "no" >&6; } esac else SAVELIBS="$LIBS" - LIBS="$LIBS -lxml2 $ZLIBLIBS" + LIBS="$LIBS $LIBXMLLIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -14408,7 +14664,7 @@ $as_echo "yes" >&6; } $as_echo "#define WITH_LIBXML /**/" >>confdefs.h - XMLLIBS="-lxml2" + XMLLIBS=$LIBXMLLIBS else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -14649,7 +14905,7 @@ else int main () { -iconv_t cd = iconv_open("", ""); iconv(cd, NULL, NULL, NULL, NULL); iconv_close(cd); +iconv_t cd = iconv_open("", ""); iconv(cd, 0, 0, 0, 0); iconv_close(cd); ; return 0; } @@ -14678,7 +14934,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext int main () { -iconv_t cd = iconv_open("", ""); const char *in = 0; iconv(cd, &in, NULL, NULL, NULL); iconv_close(cd); +iconv_t cd = iconv_open("", ""); const char *in = 0; iconv(cd, &in, 0, 0, 0); iconv_close(cd); ; return 0; } @@ -14982,116 +15238,1252 @@ _ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++11 STL should be used" >&5 -$as_echo_n "checking if the C++11 STL should be used... " >&6; } -# Check whether --with-cxx11-stl was given. -if test "${with_cxx11_stl+set}" = set; then : - withval=$with_cxx11_stl; case "$withval" in +ac_enable_cxx11="no" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable C++11 support" >&5 +$as_echo_n "checking whether to enable C++11 support... " >&6; } +# Check whether --enable-cxx11 was given. +if test "${enable_cxx11+set}" = set; then : + enableval=$enable_cxx11; case "$enableval" in yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 +$as_echo "" >&6; } + ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=false + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + ac_success=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 +$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } +if ${ax_cv_cxx_compile_cxx11+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -$as_echo "#define DCMTK_USE_CXX11_STL /**/" >>confdefs.h - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. -fi +#ifndef __cplusplus +#error "This is not a C++ compiler" +#elif __cplusplus < 201103L +#error "This is not a C++11 compiler" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_add_and_fetch" >&5 -$as_echo_n "checking for __sync_add_and_fetch... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +#else +namespace cxx11 +{ - int main(){return __sync_add_and_fetch((int *)0, 0);} + namespace test_static_assert + { + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - dcmtk_have_sync_fn=yes -else - dcmtk_have_sync_fn=no + } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "$dcmtk_have_sync_fn" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + namespace test_final_override + { -$as_echo "#define HAVE_SYNC_ADD_AND_FETCH 1" >>confdefs.h + struct Base + { + virtual void f() {} + }; - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi + struct Derived : public Base + { + virtual void f() override {} + }; + } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_sub_and_fetch" >&5 -$as_echo_n "checking for __sync_sub_and_fetch... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + namespace test_double_right_angle_brackets + { + template < typename T > + struct check {}; - int main(){return __sync_sub_and_fetch((int *)0, 0);} + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; + } -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - dcmtk_have_sync_fn=yes -else - dcmtk_have_sync_fn=no + namespace test_decltype + { -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "$dcmtk_have_sync_fn" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } -$as_echo "#define HAVE_SYNC_SUB_AND_FETCH 1" >>confdefs.h + } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi + namespace test_type_deduction + { + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __alignof__" >&5 -$as_echo_n "checking for __alignof__... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + template < typename T > + struct is_same + { + static const bool value = true; + }; + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } - int main(){char c[__alignof__(int)];return 0;} + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + + + +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ax_cv_cxx_compile_cxx11=yes +else + ax_cv_cxx_compile_cxx11=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 +$as_echo "$ax_cv_cxx_compile_cxx11" >&6; } + if test x$ax_cv_cxx_compile_cxx11 = xyes; then + ac_success=yes + fi + + + + if test x$ac_success = xno; then + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do + cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 +$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } +if eval \${$cachevar+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_CXX="$CXX" + CXX="$CXX $switch" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201103L + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + } + + namespace test_final_override + { + + struct Base + { + virtual void f() {} + }; + + struct Derived : public Base + { + virtual void f() override {} + }; + + } + + namespace test_double_right_angle_brackets + { + + template < typename T > + struct check {}; + + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; + + } + + namespace test_decltype + { + + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } + + } + + namespace test_type_deduction + { + + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + + template < typename T > + struct is_same + { + static const bool value = true; + }; + + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + + + +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval $cachevar=yes +else + eval $cachevar=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXX="$ac_save_CXX" +fi +eval ac_res=\$$cachevar + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break + fi + done + if test x$ac_success = xyes; then + break + fi + done + fi + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + if test x$ax_cxx_compile_cxx11_required = xtrue; then + if test x$ac_success = xno; then + as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 + fi + fi + if test x$ac_success = xno; then + HAVE_CXX11=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 +$as_echo "$as_me: No compiler with C++11 support was found" >&6;} + else + HAVE_CXX11=1 + +$as_echo "#define HAVE_CXX11 1" >>confdefs.h + + fi + + + if test "$HAVE_CXX11 == 1"; then + ac_enable_cxx11="yes" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable C++11 support" >&5 +$as_echo_n "checking whether to enable C++11 support... " >&6; } + ;; + + *) + ac_enable_cxx11="no" + ;; + esac + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_cxx11" >&5 +$as_echo "$ac_enable_cxx11" >&6; } + + + +ac_enable_stl="no" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL support" >&5 +$as_echo_n "checking whether to enable STL support... " >&6; } +# Check whether --enable-stl was given. +if test "${enable_stl+set}" = set; then : + enableval=$enable_stl; case "$enableval" in + yes) + ac_enable_stl="yes" + ;; + + *) + ac_enable_stl="no" + ;; + esac + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl" >&5 +$as_echo "$ac_enable_stl" >&6; } + + +ac_enable_stl_vector="auto" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL vector support" >&5 +$as_echo_n "checking whether to enable STL vector support... " >&6; } +# Check whether --enable-stl-vector was given. +if test "${enable_stl_vector+set}" = set; then : + enableval=$enable_stl_vector; case "$enableval" in + yes) + ac_enable_stl_vector="yes" + ;; + + *) + ac_enable_stl_vector="no" + ;; + esac + +fi + +if test "$ac_enable_stl_vector" = "auto"; then + ac_enable_stl_vector="$ac_enable_stl" +fi +if test "$ac_enable_stl_vector" = "yes"; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "tests/vector.cc" +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + +$as_echo "#define HAVE_STL_VECTOR /**/" >>confdefs.h + +else + ac_enable_stl_vector="unsupported -> no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_vector" >&5 +$as_echo "$ac_enable_stl_vector" >&6; } + +ac_enable_stl_algorithm="auto" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL algorithm support" >&5 +$as_echo_n "checking whether to enable STL algorithm support... " >&6; } +# Check whether --enable-stl-algorithm was given. +if test "${enable_stl_algorithm+set}" = set; then : + enableval=$enable_stl_algorithm; case "$enableval" in + yes) + ac_enable_stl_algorithm="yes" + ;; + + *) + ac_enable_stl_algorithm="no" + ;; + esac + +fi + +if test "$ac_enable_stl_algorithm" = "auto"; then + ac_enable_stl_algorithm="$ac_enable_stl" +fi +if test "$ac_enable_stl_algorithm" = "yes"; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "tests/algo.cc" +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + +$as_echo "#define HAVE_STL_ALGORITHM /**/" >>confdefs.h + +else + ac_enable_stl_algorithm="unsupported -> no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_algorithm" >&5 +$as_echo "$ac_enable_stl_algorithm" >&6; } + +ac_enable_stl_limits="auto" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL limits support" >&5 +$as_echo_n "checking whether to enable STL limits support... " >&6; } +# Check whether --enable-stl-limits was given. +if test "${enable_stl_limits+set}" = set; then : + enableval=$enable_stl_limits; case "$enableval" in + yes) + ac_enable_stl_limits="yes" + ;; + + *) + ac_enable_stl_limits="no" + ;; + esac + +fi + +if test "$ac_enable_stl_limits" = "auto"; then + ac_enable_stl_limits="$ac_enable_stl" +fi +if test "$ac_enable_stl_limits" = "yes"; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "tests/limits.cc" +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + +$as_echo "#define HAVE_STL_LIMITS /**/" >>confdefs.h + +else + ac_enable_stl_limits="unsupported -> no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_limits" >&5 +$as_echo "$ac_enable_stl_limits" >&6; } + +ac_enable_stl_list="auto" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL list support" >&5 +$as_echo_n "checking whether to enable STL list support... " >&6; } +# Check whether --enable-stl-list was given. +if test "${enable_stl_list+set}" = set; then : + enableval=$enable_stl_list; case "$enableval" in + yes) + ac_enable_stl_list="yes" + ;; + + *) + ac_enable_stl_list="no" + ;; + esac + +fi + +if test "$ac_enable_stl_list" = "auto"; then + ac_enable_stl_list="$ac_enable_stl" +fi +if test "$ac_enable_stl_list" = "yes"; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "tests/list.cc" +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + +$as_echo "#define HAVE_STL_LIST /**/" >>confdefs.h + +else + ac_enable_stl_list="unsupported -> no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_list" >&5 +$as_echo "$ac_enable_stl_list" >&6; } + +ac_enable_stl_map="auto" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL map support" >&5 +$as_echo_n "checking whether to enable STL map support... " >&6; } +# Check whether --enable-stl-map was given. +if test "${enable_stl_map+set}" = set; then : + enableval=$enable_stl_map; case "$enableval" in + yes) + ac_enable_stl_map="yes" + ;; + + *) + ac_enable_stl_map="no" + ;; + esac + +fi + +if test "$ac_enable_stl_map" = "auto"; then + ac_enable_stl_map="$ac_enable_stl" +fi +if test "$ac_enable_stl_map" = "yes"; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "tests/map.cc" +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + +$as_echo "#define HAVE_STL_MAP /**/" >>confdefs.h + +else + ac_enable_stl_map="unsupported -> no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_map" >&5 +$as_echo "$ac_enable_stl_map" >&6; } + +ac_enable_stl_memory="auto" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL memory support" >&5 +$as_echo_n "checking whether to enable STL memory support... " >&6; } +# Check whether --enable-stl-memory was given. +if test "${enable_stl_memory+set}" = set; then : + enableval=$enable_stl_memory; case "$enableval" in + yes) + ac_enable_stl_memory="yes" + ;; + + *) + ac_enable_stl_memory="no" + ;; + esac + +fi + +if test "$ac_enable_stl_memory" = "auto"; then + ac_enable_stl_memory="$ac_enable_stl" +fi +if test "$ac_enable_stl_memory" = "yes"; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "tests/memory.cc" +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + +$as_echo "#define HAVE_STL_MEMORY /**/" >>confdefs.h + +else + ac_enable_stl_memory="unsupported -> no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_memory" >&5 +$as_echo "$ac_enable_stl_memory" >&6; } + +ac_enable_stl_stack="auto" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL stack support" >&5 +$as_echo_n "checking whether to enable STL stack support... " >&6; } +# Check whether --enable-stl-stack was given. +if test "${enable_stl_stack+set}" = set; then : + enableval=$enable_stl_stack; case "$enableval" in + yes) + ac_enable_stl_stack="yes" + ;; + + *) + ac_enable_stl_stack="no" + ;; + esac + +fi + +if test "$ac_enable_stl_stack" = "auto"; then + ac_enable_stl_stack="$ac_enable_stl" +fi +if test "$ac_enable_stl_stack" = "yes"; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "tests/stack.cc" +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + +$as_echo "#define HAVE_STL_STACK /**/" >>confdefs.h + +else + ac_enable_stl_stack="unsupported -> no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_stack" >&5 +$as_echo "$ac_enable_stl_stack" >&6; } + +ac_enable_stl_string="auto" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL string support" >&5 +$as_echo_n "checking whether to enable STL string support... " >&6; } +# Check whether --enable-stl-string was given. +if test "${enable_stl_string+set}" = set; then : + enableval=$enable_stl_string; case "$enableval" in + yes) + ac_enable_stl_string="yes" + ;; + + *) + ac_enable_stl_string="no" + ;; + esac + +fi + +if test "$ac_enable_stl_string" = "auto"; then + ac_enable_stl_string="$ac_enable_stl" +fi +if test "$ac_enable_stl_string" = "yes"; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "tests/string.cc" +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + +$as_echo "#define HAVE_STL_STRING /**/" >>confdefs.h + +else + ac_enable_stl_string="unsupported -> no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_string" >&5 +$as_echo "$ac_enable_stl_string" >&6; } + +ac_enable_stl_type_traits="auto" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL type-traits support" >&5 +$as_echo_n "checking whether to enable STL type-traits support... " >&6; } +# Check whether --enable-stl-type-traits was given. +if test "${enable_stl_type_traits+set}" = set; then : + enableval=$enable_stl_type_traits; case "$enableval" in + yes) + ac_enable_stl_type_traits="yes" + ;; + + *) + ac_enable_stl_type_traits="no" + ;; + esac + +fi + +if test "$ac_enable_stl_type_traits" = "auto"; then + ac_enable_stl_type_traits="$ac_enable_stl" +fi +if test "$ac_enable_stl_type_traits" = "yes"; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "tests/ttraits.cc" +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + +$as_echo "#define HAVE_STL_TYPE_TRAITS /**/" >>confdefs.h + +else + ac_enable_stl_type_traits="unsupported -> no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_type_traits" >&5 +$as_echo "$ac_enable_stl_type_traits" >&6; } + +ac_enable_stl_tuple="auto" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL tuple support" >&5 +$as_echo_n "checking whether to enable STL tuple support... " >&6; } +# Check whether --enable-stl-tuple was given. +if test "${enable_stl_tuple+set}" = set; then : + enableval=$enable_stl_tuple; case "$enableval" in + yes) + ac_enable_stl_tuple="yes" + ;; + + *) + ac_enable_stl_tuple="no" + ;; + esac + +fi + +if test "$ac_enable_stl_tuple" = "auto"; then + ac_enable_stl_tuple="$ac_enable_stl" +fi +if test "$ac_enable_stl_tuple" = "yes"; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "tests/tuple.cc" +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + +$as_echo "#define HAVE_STL_TUPLE /**/" >>confdefs.h + +else + ac_enable_stl_tuple="unsupported -> no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_tuple" >&5 +$as_echo "$ac_enable_stl_tuple" >&6; } + +ac_enable_stl_system_error="auto" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL system_error support" >&5 +$as_echo_n "checking whether to enable STL system_error support... " >&6; } +# Check whether --enable-stl-system-error was given. +if test "${enable_stl_system_error+set}" = set; then : + enableval=$enable_stl_system_error; case "$enableval" in + yes) + ac_enable_stl_system_error="yes" + ;; + + *) + ac_enable_stl_system_error="no" + ;; + esac + +fi + +if test "$ac_enable_stl_system_error" = "auto"; then + ac_enable_stl_system_error="$ac_enable_stl" +fi +if test "$ac_enable_stl_system_error" = "yes"; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "tests/syserr.cc" +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + +$as_echo "#define HAVE_STL_SYSTEM_ERROR /**/" >>confdefs.h + +else + ac_enable_stl_system_error="unsupported -> no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl_system_error" >&5 +$as_echo "$ac_enable_stl_system_error" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_add_and_fetch" >&5 +$as_echo_n "checking for __sync_add_and_fetch... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + int main(){return __sync_add_and_fetch((int *)0, 0);} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : - dcmtk_have_alignof=yes + dcmtk_have_sync_fn=yes else - dcmtk_have_alignof=no + dcmtk_have_sync_fn=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "$dcmtk_have_alignof" = yes; then + if test "$dcmtk_have_sync_fn" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -$as_echo "#define HAVE_GNU_ALIGNOF 1" >>confdefs.h +$as_echo "#define HAVE_SYNC_ADD_AND_FETCH 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -15099,29 +16491,29 @@ $as_echo "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((aligned))" >&5 -$as_echo_n "checking for __attribute__((aligned))... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_sub_and_fetch" >&5 +$as_echo_n "checking for __sync_sub_and_fetch... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - int main(){__attribute__((aligned(4))) char c[16];return 0;} + int main(){return __sync_sub_and_fetch((int *)0, 0);} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : - dcmtk_have_attribute_aligned=yes + dcmtk_have_sync_fn=yes else - dcmtk_have_attribute_aligned=no + dcmtk_have_sync_fn=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "$dcmtk_have_attribute_aligned" = yes; then + if test "$dcmtk_have_sync_fn" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h +$as_echo "#define HAVE_SYNC_SUB_AND_FETCH 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -15129,35 +16521,59 @@ $as_echo "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((aligned)) supports templates" >&5 -$as_echo_n "checking whether __attribute__((aligned)) supports templates... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __alignof__" >&5 +$as_echo_n "checking for __alignof__... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - template - struct test { typedef T type __attribute__((aligned(4))); }; - int main() - { - test::type i; - return 0; - } + int main(){char c[__alignof__(int)];return 0;} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : - dcmtk_attribute_aligned_supports_templates=yes + dcmtk_have_alignof=yes else - dcmtk_attribute_aligned_supports_templates=no + dcmtk_have_alignof=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "$dcmtk_attribute_aligned_supports_templates" = yes; then + if test "$dcmtk_have_alignof" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -$as_echo "#define ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES 1" >>confdefs.h +$as_echo "#define HAVE_GNU_ALIGNOF 1" >>confdefs.h + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((aligned))" >&5 +$as_echo_n "checking for __attribute__((aligned))... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + int main(){__attribute__((aligned(4))) char c[16];return 0;} + + +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + dcmtk_have_attribute_aligned=yes +else + dcmtk_have_attribute_aligned=no + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$dcmtk_have_attribute_aligned" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -15165,33 +16581,35 @@ $as_echo "no" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether alignas supports typedefs" >&5 -$as_echo_n "checking whether alignas supports typedefs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((aligned)) supports templates" >&5 +$as_echo_n "checking whether __attribute__((aligned)) supports templates... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + template + struct test { typedef T type __attribute__((aligned(4))); }; int main() { - typedef char type[16] alignas(4); + test::type i; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : - dcmtk_alignas_supports_typedefs=yes + dcmtk_attribute_aligned_supports_templates=yes else - dcmtk_alignas_supports_typedefs=no + dcmtk_attribute_aligned_supports_templates=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "$dcmtk_alignas_supports_typedefs" = yes; then + if test "$dcmtk_attribute_aligned_supports_templates" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -$as_echo "#define ALIGNAS_SUPPORTS_TYPEDEFS 1" >>confdefs.h +$as_echo "#define ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -15816,7 +17234,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dcmtk $as_me 3.6.1, which was +This file was extended by dcmtk $as_me 3.6.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15879,7 +17297,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dcmtk config.status 3.6.1 +dcmtk config.status 3.6.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/config/configure.in b/config/configure.in index 681ee68a..b80d6db3 100644 --- a/config/configure.in +++ b/config/configure.in @@ -1,16 +1,18 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(dcmtk, 3.6.1, [bugs@dcmtk.org], [dcmtk-3.6.1], [http://www.dcmtk.org/]) +AC_INIT(dcmtk, 3.6.2, [bugs@dcmtk.org], [dcmtk-3.6.2], [http://www.dcmtk.org/]) AC_PREREQ(2.60) AC_CONFIG_SRCDIR(Makefile.in) AC_CONFIG_HEADER(include/dcmtk/config/osconfig.h) +m4_include([stdcxx.m4]) + dnl ------------------------------------------------------- dnl Additional Package Information dnl ------------------------------------------------------- -PACKAGE_VERSION_NUMBER=361 +PACKAGE_VERSION_NUMBER=362 PACKAGE_VERSION_SUFFIX="" -PACKAGE_DATE="DEV" +PACKAGE_DATE="2017-07-14" AC_DEFINE_UNQUOTED(PACKAGE_VERSION_NUMBER,${PACKAGE_VERSION_NUMBER},[Define to the version number of this package.]) AC_DEFINE_UNQUOTED(PACKAGE_VERSION_SUFFIX,"${PACKAGE_VERSION_SUFFIX}",[Define to the version suffix of this package.]) @@ -98,14 +100,12 @@ AH_TOP([#ifndef OSCONFIG_H #ifdef __MINGW32__ #define HAVE_WINDOWS_H 1 #define HAVE_WINSOCK_H 1 -#define NO_IOS_BASE_ASSIGN 1 #define ENVIRONMENT_PATH_SEPARATOR ';' #endif]) -AH_BOTTOM([#if defined(DCMTK_USE_CXX11_STL) && defined(__cplusplus) && __cplusplus < 201103L +AH_BOTTOM([#if defined(HAVE_CXX11) && defined(__cplusplus) && __cplusplus < 201103L #error\ - DCMTK was configured to use the C++11 STL, but your compiler is not configured\ - for building with C++11 features. +DCMTK was configured to use C++11 features, but your compiler does not or was not configured to provide them. #endif #endif /* OSCONFIG_H */]) @@ -250,7 +250,7 @@ AC_CHECK_FUNCS(getpid mktemp tempnam tmpnam getenv mkstemp) AC_CHECK_FUNCS(stat) AC_CHECK_FUNCS(malloc_debug) AC_CHECK_FUNCS(strerror strdup bzero index rindex access) -AC_CHECK_FUNCS(uname cuserid getlogin) +AC_CHECK_FUNCS(uname cuserid getlogin getlogin_r) AC_CHECK_FUNCS(usleep) AC_CHECK_FUNCS(flock lockf) AC_CHECK_FUNCS(listen connect setsockopt getsockopt select) @@ -265,6 +265,7 @@ AC_CHECK_FUNCS(strlcpy strlcat) AC_CHECK_FUNCS(vsnprintf) AC_CHECK_FUNCS(mbstowcs wcstombs) AC_CHECK_FUNCS(popen pclose) +AC_CHECK_FUNCS(readdir_r) AC_FUNC_FSEEKO @@ -648,6 +649,10 @@ if test $THREADSUPPORT = posix ; then ;; *-*-netbsdelf2*) ;; + *-*-netbsd*) + CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CXXFLAGS" + CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CFLAGS" + ;; *-*-darwin*) dnl On Mac OS X we need to have _DARWIN_C_SOURCE defined to enable UNIX standard API for system headers CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS" @@ -693,6 +698,10 @@ if test $THREADSUPPORT = posix ; then ;; *-*-netbsdelf2*) ;; + *-*-netbsd*) + CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CXXFLAGS" + CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_NETBSD_SOURCE -D_BSD_COMPAT $CFLAGS" + ;; *-*-darwin*) dnl On Mac OS X we need to have _DARWIN_C_SOURCE source defined to enable UNIX standard API for system headers CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS" @@ -774,6 +783,7 @@ dnl The following AC_CHECK_* macros _must_ have corresponding entries in dnl the acconfig.h file. This is because the macros are specific to the dnl DCMTK project and are not supported by GNU autoheader. +AC_CHECK_PROTOTYPE(feenableexcept, fenv.h) AC_CHECK_PROTOTYPE(_stricmp, string.h) AC_CHECK_PROTOTYPE(accept, sys/types.h sys/socket.h) if test $ac_cv_prototype_accept = yes ; then @@ -791,6 +801,7 @@ AC_CHECK_PROTOTYPE(std::isnan, cmath) AC_CHECK_PROTOTYPE(flock, sys/file.h) AC_CHECK_PROTOTYPE(gethostbyname, libc.h unistd.h stdlib.h netdb.h) AC_CHECK_PROTOTYPE(gethostbyname_r, libc.h unistd.h stdlib.h netdb.h) +AC_CHECK_PROTOTYPE(gethostbyaddr_r, libc.h unistd.h stdlib.h netdb.h) AC_CHECK_PROTOTYPE(gethostid, libc.h unistd.h stdlib.h netdb.h) AC_CHECK_PROTOTYPE(gethostname, unistd.h libc.h stdlib.h netdb.h) AC_CHECK_PROTOTYPE(getsockname, sys/types.h sys/socket.h) @@ -826,6 +837,7 @@ if test $ac_cv_header_math_h = yes ; then AC_INCLUDE_MATH_H_AS_CXX fi + dnl ------------------------------------------------------- dnl Checks for the usage of standard C++ headers. dnl ------------------------------------------------------- @@ -1134,6 +1146,7 @@ if test "${LIBXMLCFLAGS+set}" = set; then CXXFLAGS="$LIBXMLCFLAGS $CXXFLAGS" CFLAGS="$LIBXMLCFLAGS $CFLAGS" fi +LIBXMLLIBS=`xml2-config --libs 2>/dev/null` XMLLIBS="" AC_MSG_CHECKING(whether to include libxml support) @@ -1144,18 +1157,18 @@ AS_HELP_STRING([--without-libxml], [don't include libxml support])], yes) AC_MSG_RESULT(yes) AC_DEFINE(WITH_LIBXML, , [Define if we are compiling with libxml support.]) - XMLLIBS="-lxml2" + XMLLIBS=$LIBXMLLIBS ;; *) AC_MSG_RESULT(no) ;; esac ], [ SAVELIBS="$LIBS" - LIBS="$LIBS -lxml2 $ZLIBLIBS" + LIBS="$LIBS $LIBXMLLIBS" AC_TRY_LINK([#include ], [(void) xmlInitParser()], [ AC_MSG_RESULT(yes) AC_DEFINE(WITH_LIBXML, , [Define if we are compiling with libxml support.]) - XMLLIBS="-lxml2" ], + XMLLIBS=$LIBXMLLIBS ], [AC_MSG_RESULT(no)]) LIBS="$SAVELIBS"] ) @@ -1261,7 +1274,7 @@ AS_HELP_STRING([--without-libiconv], [don't include libiconv support])], esac ], [ SAVELIBS="$LIBS" LIBS="$LIBS -liconv -lcharset" - AC_TRY_LINK([#include ], [iconv_t cd = iconv_open("", ""); iconv(cd, NULL, NULL, NULL, NULL); iconv_close(cd);], + AC_TRY_LINK([#include ], [iconv_t cd = iconv_open("", ""); iconv(cd, 0, 0, 0, 0); iconv_close(cd);], [ WITH_LIBICONV=yes AC_DEFINE(WITH_LIBICONV) ICONVLIBS="-liconv -lcharset" ]) @@ -1271,7 +1284,7 @@ AC_MSG_RESULT($WITH_LIBICONV) AC_MSG_CHECKING(whether the second argument to iconv() is const) SAVELIBS="$LIBS" LIBS="$LIBS $ICONVLIBS" -AC_TRY_COMPILE([#include ], [iconv_t cd = iconv_open("", ""); const char *in = 0; iconv(cd, &in, NULL, NULL, NULL); iconv_close(cd);], +AC_TRY_COMPILE([#include ], [iconv_t cd = iconv_open("", ""); const char *in = 0; iconv(cd, &in, 0, 0, 0); iconv_close(cd);], [ AC_MSG_RESULT(yes) AC_DEFINE(LIBICONV_SECOND_ARGUMENT_CONST, , [Define if the second argument to iconv() is const.]) ], [AC_MSG_RESULT(no)]) @@ -1337,7 +1350,11 @@ dnl ------------------------------------------------------- AH_VERBATIM([DCMTK_CHARSET_CONVERSION_CONSTANTS], [/* character set conversion constants. */ #define DCMTK_CHARSET_CONVERSION_ICU 1 #define DCMTK_CHARSET_CONVERSION_ICONV 2 -#define DCMTK_CHARSET_CONVERSION_STDLIBC_ICONV 3]) +#define DCMTK_CHARSET_CONVERSION_STDLIBC_ICONV 3 + +/* LFS mode constants. */ +#define DCMTK_LFS 1 +#define DCMTK_LFS64 2]) CHARCONVINCLUDES="" CHARCONVLIBS="" @@ -1413,25 +1430,313 @@ if [[ ! -z "$DCMTK_ENABLE_CHARSET_CONVERSION" ]]; then [Define to select character set conversion implementation.]) fi + dnl ------------------------------------------------------- -dnl C++11 support +dnl include config test code from config/tests dnl ------------------------------------------------------- -AC_MSG_CHECKING(if the C++11 STL should be used) -AC_ARG_WITH(cxx11-stl, -[ --with-cxx11-stl enable C++11 STL - --without-cxx11-stl disable C++11 STL (default)], -[ case "$withval" in +ac_enable_cxx11="no" +AC_MSG_CHECKING(whether to enable C++11 support) +AC_ARG_ENABLE(cxx11, +[ --enable-cxx11 use C++11 + --disable-cxx11 do not use C++11 (default)], +[ case "$enableval" in yes) - AC_MSG_RESULT(yes) - AC_DEFINE(DCMTK_USE_CXX11_STL, , [Enable or disable C++11 while building DCMTK.]) + AC_MSG_RESULT() + AX_CXX_COMPILE_STDCXX([11], [noext], [optional]) + if test "$HAVE_CXX11 == 1"; then + ac_enable_cxx11="yes" + fi + AC_MSG_CHECKING(whether to enable C++11 support) + ;; + + *) + ac_enable_cxx11="no" + ;; + esac ] +) +AC_MSG_RESULT($ac_enable_cxx11) + + +dnl ------------------------------------------------------- +dnl Enable/disable STL support. +dnl ------------------------------------------------------- + +ac_enable_stl="no" +AC_MSG_CHECKING(whether to enable STL support) +AC_ARG_ENABLE(stl, +[ --enable-stl use C++ STL + --disable-stl do not use C++ STL (default)], +[ case "$enableval" in + yes) + ac_enable_stl="yes" + ;; + + *) + ac_enable_stl="no" ;; + esac ] +) +AC_MSG_RESULT($ac_enable_stl) + + +ac_enable_stl_vector="auto" +AC_MSG_CHECKING(whether to enable STL vector support) +AC_ARG_ENABLE(stl-vector, +[ --enable-stl-vector use C++ STL vector + --disable-stl-vector do not use C++ STL vector], +[ case "$enableval" in + yes) + ac_enable_stl_vector="yes" + ;; + *) - AC_MSG_RESULT(no) + ac_enable_stl_vector="no" ;; - esac ], - AC_MSG_RESULT(no) + esac] +) +if test "$ac_enable_stl_vector" = "auto"; then + ac_enable_stl_vector="$ac_enable_stl" +fi +if test "$ac_enable_stl_vector" = "yes"; then + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/vector.cc"]])], [AC_DEFINE(HAVE_STL_VECTOR, , [Define if STL's vector should be used.])], [ac_enable_stl_vector="unsupported -> no"]) +fi +AC_MSG_RESULT($ac_enable_stl_vector) + +ac_enable_stl_algorithm="auto" +AC_MSG_CHECKING(whether to enable STL algorithm support) +AC_ARG_ENABLE(stl-algorithm, +[ --enable-stl-algorithm use C++ STL algorithm + --disable-stl-algorithm do not use C++ STL algorithm], +[ case "$enableval" in + yes) + ac_enable_stl_algorithm="yes" + ;; + + *) + ac_enable_stl_algorithm="no" + ;; + esac ] ) +if test "$ac_enable_stl_algorithm" = "auto"; then + ac_enable_stl_algorithm="$ac_enable_stl" +fi +if test "$ac_enable_stl_algorithm" = "yes"; then + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/algo.cc"]])], [AC_DEFINE(HAVE_STL_ALGORITHM, , [Define if STL's algorithm should be used.])], [ac_enable_stl_algorithm="unsupported -> no"]) +fi +AC_MSG_RESULT($ac_enable_stl_algorithm) + +ac_enable_stl_limits="auto" +AC_MSG_CHECKING(whether to enable STL limits support) +AC_ARG_ENABLE(stl-limits, +[ --enable-stl-limits use C++ STL limits + --disable-stl-limits do not use C++ STL limits], +[ case "$enableval" in + yes) + ac_enable_stl_limits="yes" + ;; + + *) + ac_enable_stl_limits="no" + ;; + esac ] +) +if test "$ac_enable_stl_limits" = "auto"; then + ac_enable_stl_limits="$ac_enable_stl" +fi +if test "$ac_enable_stl_limits" = "yes"; then + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/limits.cc"]])], [AC_DEFINE(HAVE_STL_LIMITS, , [Define if STL's limits should be used.])], [ac_enable_stl_limits="unsupported -> no"]) +fi +AC_MSG_RESULT($ac_enable_stl_limits) + +ac_enable_stl_list="auto" +AC_MSG_CHECKING(whether to enable STL list support) +AC_ARG_ENABLE(stl-list, +[ --enable-stl-list use C++ STL list + --disable-stl-list do not use C++ STL list], +[ case "$enableval" in + yes) + ac_enable_stl_list="yes" + ;; + + *) + ac_enable_stl_list="no" + ;; + esac ] +) +if test "$ac_enable_stl_list" = "auto"; then + ac_enable_stl_list="$ac_enable_stl" +fi +if test "$ac_enable_stl_list" = "yes"; then + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/list.cc"]])], [AC_DEFINE(HAVE_STL_LIST, , [Define if STL's list should be used.])], [ac_enable_stl_list="unsupported -> no"]) +fi +AC_MSG_RESULT($ac_enable_stl_list) + +ac_enable_stl_map="auto" +AC_MSG_CHECKING(whether to enable STL map support) +AC_ARG_ENABLE(stl-map, +[ --enable-stl-map use C++ STL map + --disable-stl-map do not use C++ STL map], +[ case "$enableval" in + yes) + ac_enable_stl_map="yes" + ;; + + *) + ac_enable_stl_map="no" + ;; + esac ] +) +if test "$ac_enable_stl_map" = "auto"; then + ac_enable_stl_map="$ac_enable_stl" +fi +if test "$ac_enable_stl_map" = "yes"; then + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/map.cc"]])], [AC_DEFINE(HAVE_STL_MAP, , [Define if STL's map should be used.])], [ac_enable_stl_map="unsupported -> no"]) +fi +AC_MSG_RESULT($ac_enable_stl_map) + +ac_enable_stl_memory="auto" +AC_MSG_CHECKING(whether to enable STL memory support) +AC_ARG_ENABLE(stl-memory, +[ --enable-stl-memory use C++ STL memory + --disable-stl-memory do not use C++ STL memory], +[ case "$enableval" in + yes) + ac_enable_stl_memory="yes" + ;; + + *) + ac_enable_stl_memory="no" + ;; + esac ] +) +if test "$ac_enable_stl_memory" = "auto"; then + ac_enable_stl_memory="$ac_enable_stl" +fi +if test "$ac_enable_stl_memory" = "yes"; then + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/memory.cc"]])], [AC_DEFINE(HAVE_STL_MEMORY, , [Define if STL's memory should be used.])], [ac_enable_stl_memory="unsupported -> no"]) +fi +AC_MSG_RESULT($ac_enable_stl_memory) + +ac_enable_stl_stack="auto" +AC_MSG_CHECKING(whether to enable STL stack support) +AC_ARG_ENABLE(stl-stack, +[ --enable-stl-stack use C++ STL stack + --disable-stl-stack do not use C++ STL stack], +[ case "$enableval" in + yes) + ac_enable_stl_stack="yes" + ;; + + *) + ac_enable_stl_stack="no" + ;; + esac ] +) +if test "$ac_enable_stl_stack" = "auto"; then + ac_enable_stl_stack="$ac_enable_stl" +fi +if test "$ac_enable_stl_stack" = "yes"; then + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/stack.cc"]])], [AC_DEFINE(HAVE_STL_STACK, , [Define if STL's stack should be used.])], []ac_enable_stl_stack="unsupported -> no") +fi +AC_MSG_RESULT($ac_enable_stl_stack) + +ac_enable_stl_string="auto" +AC_MSG_CHECKING(whether to enable STL string support) +AC_ARG_ENABLE(stl-string, +[ --enable-stl-string use C++ STL string + --disable-stl-string do not use C++ STL string], +[ case "$enableval" in + yes) + ac_enable_stl_string="yes" + ;; + + *) + ac_enable_stl_string="no" + ;; + esac ] +) +if test "$ac_enable_stl_string" = "auto"; then + ac_enable_stl_string="$ac_enable_stl" +fi +if test "$ac_enable_stl_string" = "yes"; then + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/string.cc"]])], [AC_DEFINE(HAVE_STL_STRING, , [Define if STL's string should be used.])], [ac_enable_stl_string="unsupported -> no"]) +fi +AC_MSG_RESULT($ac_enable_stl_string) + +ac_enable_stl_type_traits="auto" +AC_MSG_CHECKING(whether to enable STL type-traits support) +AC_ARG_ENABLE(stl-type-traits, +[ --enable-stl-type-traits + use C++ STL type-traits + --disable-stl-type-traits + do not use C++ STL type-traits], +[ case "$enableval" in + yes) + ac_enable_stl_type_traits="yes" + ;; + + *) + ac_enable_stl_type_traits="no" + ;; + esac ] +) +if test "$ac_enable_stl_type_traits" = "auto"; then + ac_enable_stl_type_traits="$ac_enable_stl" +fi +if test "$ac_enable_stl_type_traits" = "yes"; then + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/ttraits.cc"]])], [AC_DEFINE(HAVE_STL_TYPE_TRAITS, , [Define if STL's type traits should be used.])], [ac_enable_stl_type_traits="unsupported -> no"]) +fi +AC_MSG_RESULT($ac_enable_stl_type_traits) + +ac_enable_stl_tuple="auto" +AC_MSG_CHECKING(whether to enable STL tuple support) +AC_ARG_ENABLE(stl-tuple, +[ --enable-stl-tuple use C++ STL tuple + --disable-stl-tuple do not use C++ STL tuple], +[ case "$enableval" in + yes) + ac_enable_stl_tuple="yes" + ;; + + *) + ac_enable_stl_tuple="no" + ;; + esac ] +) +if test "$ac_enable_stl_tuple" = "auto"; then + ac_enable_stl_tuple="$ac_enable_stl" +fi +if test "$ac_enable_stl_tuple" = "yes"; then + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/tuple.cc"]])], [AC_DEFINE(HAVE_STL_TUPLE, , [Define if STL's tuple should be used.])], [ac_enable_stl_tuple="unsupported -> no"]) +fi +AC_MSG_RESULT($ac_enable_stl_tuple) + +ac_enable_stl_system_error="auto" +AC_MSG_CHECKING(whether to enable STL system_error support) +AC_ARG_ENABLE(stl-system-error, +[ --enable-stl-system-error + use C++ STL system_error + --disable-stl-system_error + do not use C++ STL system_error], +[ case "$enableval" in + yes) + ac_enable_stl_system_error="yes" + ;; + + *) + ac_enable_stl_system_error="no" + ;; + esac ] +) +if test "$ac_enable_stl_system_error" = "auto"; then + ac_enable_stl_system_error="$ac_enable_stl" +fi +if test "$ac_enable_stl_system_error" = "yes"; then + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/syserr.cc"]])], [AC_DEFINE(HAVE_STL_SYSTEM_ERROR, , [Define if STL's system_error should be used.])], [ac_enable_stl_system_error="unsupported -> no"]) +fi +AC_MSG_RESULT($ac_enable_stl_system_error) + dnl ------------------------------------------------------- dnl Test for some additional functions and keywords @@ -1442,7 +1747,6 @@ AC_CHECK_SYNC_FN([__sync_sub_and_fetch],[HAVE_SYNC_SUB_AND_FETCH]) AC_CHECK_ALIGNOF([HAVE_GNU_ALIGNOF]) AC_CHECK_ATTRIBUTE_ALIGNED([HAVE_ATTRIBUTE_ALIGNED]) AC_CHECK_ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES([ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES]) -AC_CHECK_ALIGNAS_SUPPORTS_TYPEDEFS([ALIGNAS_SUPPORTS_TYPEDEFS]) AC_CHECK_DEFAULT_CONSTRUCTOR_DETECTION_VIA_SFINAE([HAVE_DEFAULT_CONSTRUCTOR_DETECTION_VIA_SFINAE]) dnl ------------------------------------------------------- diff --git a/config/docs/CMakeLists.txt b/config/docs/CMakeLists.txt index eb46e4c1..e2e3bd1d 100644 --- a/config/docs/CMakeLists.txt +++ b/config/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES config.txt dirstruc.txt envvars.txt macros.txt modules.txt DESTINATION ${DCMTK_INSTALL_DOCDIR} COMPONENT doc) +INSTALL(FILES config.txt dirstruc.txt envvars.txt macros.txt modules.txt DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc) diff --git a/config/docs/cxx11.dox b/config/docs/cxx11.dox index b7742891..ad477397 100644 --- a/config/docs/cxx11.dox +++ b/config/docs/cxx11.dox @@ -14,18 +14,21 @@ directly supports, for example: \li OFunique_ptr (std::unique_ptr) \li OFshared_ptr (std::shared_ptr) +\li OFnumeric_limits (std::numeric_limits) +\li OFtuple (std::tuple) +\li OFerror_code (std::error_code) Since not every compiler supports C++11, legacy implementations for the respective functionality have been created, which are enabled by default. If you use C++11 in your project, you may want to use the native C++11 classes -instead, so you don't need to convert your objects to use them with DCMTK. To -do so, you need to configure DCMTK to use the C++11 STL, which is described -below. +and features instead, so you don't need to convert your objects to use them +with DCMTK. To do so, you need to configure DCMTK to use the C++11 STL, which +is described below. -

Enabling DCMTK to use the C++11 STL

+

Enabling DCMTK to use C++11

-By enabling DCMTK to use the C++11 STL, you gain the following advantages: +By enabling DCMTK to use C++11, you gain the following advantages: \li DCMTK will use available C++11 features instead of its only legacy implementations. These are probably more efficient and complete. @@ -33,15 +36,15 @@ By enabling DCMTK to use the C++11 STL, you gain the following advantages: DCMTK to assist you when checking for API/ABI (in-)compatibility between C++11 and non C++11 builds. -Trying to include a DCMTK build with C++11 STL enabled from a non C++11 +Trying to include a DCMTK build with C++11 enabled from a non C++11 environment will give you the following error message: @verbatim -DCMTK was configured to use the C++11 STL, but your compiler is not configured for building with C++11 features. +DCMTK was configured to use C++11 features, but your compiler does not or was not configured to provide them. @endverbatim -To reduce DCMTK's implementation complexity, the C++11 STL shall only be used if -your compiler conforms closely to the C++11 Standard. As far as we know, +To reduce DCMTK's implementation complexity, C++11 shall only be used if your +compiler conforms closely to the C++11 Standard. As far as we know, this is currently true for the following compilers: \li GNU C++ Compiler (g++) Version 4.8.1 or later. @@ -52,65 +55,85 @@ Autoconf, see the appropriate section below:

CMake

-CMake detects the C++11 compilers mentioned above and knows how to enable C++11 -features on these compilers. If your compiler was detected successfully, CMake -will give you the following message during configure: +Request building with C++11 features by setting the option +DCMTK_ENABLE_CXX11 to On, for example via: @verbatim -Info: Your compiler supports C++11. You may enable C++11 features via "DCMTK_USE_CXX11_STL" to create a C++11 build of DCMTK. +cmake ... -DDCMTK_ENABLE_CXX11:BOOL=ON ... @endverbatim -As mentioned in this message, you may enable the C++11 STL by setting -DCMTK_USE_CXX11_STL, for example via: +CMake detects the C++11 compilers and knows how to enable C++11 features on +Clang, GCC and Intel compilers. You can override the assumed compiler flags +(for example to enable C++14 instead) by modifying +DCMTK_CXX11_FLAGS, for example: @verbatim -cmake ... -DDCMTK_USE_CXX11_STL:BOOL=ON +cmake ... -DDCMTK_ENABLE_CXX11:BOOL=ON -DDCMTK_CXX11_FLAGS=-std=c++14 ... @endverbatim -Doing so will give you the following message during configure: +CMake will then perform basic checks to ensure the compiler is configured +correctly and conforms closely enough to C++11 standard. If everything +works CMake will print something like this: @verbatim -Info: Configured DCMTK to use native C++11 features. +-- Checking whether the compiler supports C++11 +-- Checking whether the compiler supports C++11 -- yes +-- Info: C++11 features enabled @endverbatim -You may need to override the flags to enable C++11, for example to enable C++14 -instead. Doing so can be done via DCMTK_CXX11_FLAGS, for example: +

Unsupported Compilers

+ +If our CMake setup does not know how to enable C++11 on your compiler, it will +simply assume that no configuration is required (e.g. for Visual Studio). If +this is not appropriate you have to set DCMTK_CXX11_FLAGS manually +as mentioned above. +If you enable C++11 via DCMTK_ENABLE_CXX11 for an unsupported +compiler, CMake will simply set the flags provided via +DCMTK_CXX11_FLAGS (if any) and still run the C++11 compatibility +test to the compiler conforms closely enough to the C++11 standard for being +able to compile DCMTK. If it doesn't, CMake will give an output similar to +this one: @verbatim -cmake ... -DDCMTK_USE_CXX11_STL:BOOL=ON -DDCMTK_CXX11_FLAGS=-std=c++14 +-- Checking whether the compiler supports C++11 +-- Checking whether the compiler supports C++11 -- no +-- Info: C++11 features disabled @endverbatim -

Unsupported Compilers

+At this point you will not be able to enable C++11 features for the given +compiler, since building DCMTK would fail if you did. If you are sure that +your compiler supports C++11, you should try setting different flags as +DCMTK_CXX11_FLAGS. -If CMake does not know how to enable C++11 on your compiler or your compiler -does not support C++11 completely, you will see the following warning message -when you try to enable DCMTK_USE_CXX11_STL anyway: +

GNU Autoconf

+ +Our GNU Autoconf setup understands the switches \--enable-cxx11, +and \--disable-cxx11 that may be used to configure DCMTK to use +C++11 features. If you run @verbatim -DCMTK has been configured to use the C++11 STL, but the compiler does not seem to support C++11. -Override this warning by setting DCMTK_CXX11_FLAGS to tell DCMTK how to enable C++11 support for your compiler. +configure --enable-cxx11 @endverbatim -As the message states, you need to take care about configuring your compiler for -C++11 manually, for example by setting CMAKE_CXX_FLAGS appropriately. -Setting DCMTK_CXX11_FLAGS instead will have the same result (CMake -will set CMAKE_CXX_FLAGS based on DCMTK_CXX_FLAGS), but -the warning goes away and instead you will see the following output: +our Autoconf script will try to determine the required compiler flags for +enabling C++11 features (if any) and perform configuration tests to ensure +the compiler conforms closely enough to the C++11 standard. If everything +works it will give you an output similar to this one: @verbatim -Info: Enabling C++11 support with custom flags "< YOUR FLAGS >" for a potentially unsupported compiler. +checking whether to enable C++11 support... +checking whether c++ supports C++11 features by default... no +checking whether c++ supports C++11 features with -std=c++11... yes +checking whether to enable C++11 support... yes @endverbatim -

GNU Autoconf

- -Our GNU Autoconf setup understands the argument \--with-cxx11-stl, -that may be used to configure DCMTK to use the C++11 STL. But this only enables -API/ABI checks and maps DCMTK's functionalities to the respective STL ones. You -still need to configure your compiler for C++11 manually, for example by setting -the CXXFLAGS like this when using GCC 4.9: +Otherwise, it will still disable C++11 features with an output like this: @verbatim -./configure --with-cxx11-stl CXXFLAGS=-std=c++11 +checking whether to enable C++11 support... +checking whether c++ supports C++11 features by default... no +checking whether c++ supports C++11 features with -std=c++11... no +checking whether to enable C++11 support... no @endverbatim */ diff --git a/config/docs/macros.txt b/config/docs/macros.txt index 0133ee38..d50b7b96 100644 --- a/config/docs/macros.txt +++ b/config/docs/macros.txt @@ -55,13 +55,6 @@ DCMTK_GUI either present them to the user or store them in a log file. See comments in ofstd/include/dcmtk/ofstd/ofconsol.h. -DCMTK_USE_CXX11_STL - Affected: ofstd - Type of modification: Activates feature - Explanation: DCMTK_USE_CXX11_STL is defined when the appropriate options are - passed to the configuration system. DCMTK will then use the native C++11 - STL classes and functions instead of it's own (legacy) implementations. - DICOMDIR_WITHOUT_BACKUP Affected: dcmdata Type of modification: Disables feature @@ -75,6 +68,15 @@ DISABLE_COMPRESSION_EXTENSION Explanation: Disables the support of compression (various transfer syntaxes) in dcmqrdb, a feature which is still experimental. +DISABLE_FF_JPEG_BITSTREAM_PADDING + Affected: dcmjpeg, dcmjpls + Type of modification: Disables feature + Explanation: Starting with release 3.6.2, DCMTK pads JPEG and JPEG-LS + bitstreams that have odd length with an "extended" end of image (EOI) + marker, writing ff/ff/d9 instead of adding a zero byte after the + EOI marker, i.e. writing ff/d9/00. The old behaviour can be restored + by defining this macro. + DISABLE_NAGLE_ALGORITHM Affected: dcmnet Type of modification: Disables feature @@ -171,61 +173,6 @@ EXPERIMENTAL_READ_FROM_FILE Explanation: When this macro is defined, the relatively new function createValueFromTempFile() is used for reading large binary data files. -HAVE_STD_STRING - Affected: ofstd - Type of modification: Activates feature - Explanation: When this macro is defined, the ANSI C++ standard string - class is used instead of DCMTK's own implementation. - -HAVE_STL - Affected: ofstd - Type of modification: Activates feature - Explanation: When this macro is defined, the STL (standard template - library) list, map, stack, vector and auto_ptr classes as well as - the STL algorithms are used instead of DCMTK's own implementations. - -HAVE_STL_ALGORITHMS - Affected: ofstd - Type of modification: Activates feature - Explanation: When this macro is defined, the STL (standard template - library) algorithms are used instead of DCMTK's own implementation. - Also see HAVE_STL. - -HAVE_STL_AUTO_PTR - Affected: ofstd - Type of modification: Activates feature - Explanation: When this macro is defined, the STL (standard template - library) auto_ptr class is used instead of DCMTK's own implementation. - Also see HAVE_STL. - -HAVE_STL_LIST - Affected: ofstd - Type of modification: Activates feature - Explanation: When this macro is defined, the STL (standard template - library) list class is used instead of DCMTK's own implementation. - Also see HAVE_STL. - -HAVE_STL_MAP - Affected: ofstd - Type of modification: Activates feature - Explanation: When this macro is defined, the STL (standard template - library) map class is used instead of DCMTK's own implementation. - Also see HAVE_STL. - -HAVE_STL_STACK - Affected: ofstd - Type of modification: Activates feature - Explanation: When this macro is defined, the STL (standard template - library) stack class is used instead of DCMTK's own implementation. - Also see HAVE_STL. - -HAVE_STL_VECTOR - Affected: ofstd - Type of modification: Activates feature - Explanation: When this macro is defined, the STL (standard template - library) vector class is used instead of DCMTK's own implementation. - Also see HAVE_STL. - LOCK_IMAGE_FILES Affected: dcmpstat, dcmqrdb Type of modification: Activates experimental or rarely used feature @@ -244,14 +191,6 @@ NO_GET_SUPPORT Type of modification: Disables feature Explanation: Disables the experimental C-GET support in dcmqrdb. -NO_IOS_BASE_ASSIGN - Affected: all command line tools - Type of modification: Disables feature - Explanation: On Win32 platforms, the prepareCmdLineArgs() function - maps cout to cerr by assignment. This does not work with all - iostream implementations and can, therefore, be disabled with this - macro. - NO_PATIENTSTUDYONLY_SUPPORT Affected: dcmqrdb Type of modification: Disables feature @@ -385,6 +324,15 @@ USE_NULL_SAFE_OFSTRING HAVE_STD_STRING is also defined. Currently, this macro is always defined by DCMTK's Makefiles. This will change in future releases. +USE_WIN32_CREATE_MUTEX + Affected: ofstd + Type of modification: Activates alternative implementation + Explanation: Starting with DCMTK 3.6.2, the Win32 version of the + OFMutex class uses critical sections instead of Win32 mutexes, because + critical sections are much faster. Their only drawback is that they + cannot be shared across processes. Users who want to revert to the + behavior of older DCMTK releases can define this macro. + USING_STD_NAMESPACE Affected: all modules Type of modification: Re-activated behavior of earlier DCMTK releases diff --git a/config/include/dcmtk/config/osconfig.h.in b/config/include/dcmtk/config/osconfig.h.in index 269b04ab..aab5f420 100644 --- a/config/include/dcmtk/config/osconfig.h.in +++ b/config/include/dcmtk/config/osconfig.h.in @@ -20,13 +20,9 @@ #ifdef __MINGW32__ #define HAVE_WINDOWS_H 1 #define HAVE_WINSOCK_H 1 -#define NO_IOS_BASE_ASSIGN 1 #define ENVIRONMENT_PATH_SEPARATOR ';' #endif -/* Define if alignas supports typedefs */ -#undef ALIGNAS_SUPPORTS_TYPEDEFS - /* Define if __attribute__((aligned)) supports templates */ #undef ATTRIBUTE_ALIGNED_SUPPORTS_TEMPLATES @@ -48,15 +44,19 @@ #define DCMTK_CHARSET_CONVERSION_ICONV 2 #define DCMTK_CHARSET_CONVERSION_STDLIBC_ICONV 3 +/* LFS mode constants. */ +#define DCMTK_LFS 1 +#define DCMTK_LFS64 2 + /* Define to select character set conversion implementation. */ #undef DCMTK_ENABLE_CHARSET_CONVERSION +/* Select LFS mode (defined above) that shall be used or don't define it */ +#undef DCMTK_ENABLE_LFS + /* Define the DCMTK default path. */ #undef DCMTK_PREFIX -/* Enable or disable C++11 while building DCMTK. */ -#undef DCMTK_USE_CXX11_STL - /* Empty default data dictionary path for the dcmdata library package. */ #undef DCM_DICT_DEFAULT_PATH @@ -149,6 +149,9 @@ /* Define to 1 if you have the `cuserid' function. */ #undef HAVE_CUSERID +/* define if the compiler supports basic C++11 syntax */ +#undef HAVE_CXX11 + /* Define if bool is a built-in type */ #undef HAVE_CXX_BOOL @@ -271,6 +274,9 @@ /* Define to 1 if you have the `getlogin' function. */ #undef HAVE_GETLOGIN +/* Define to 1 if you have the `getlogin_r' function. */ +#undef HAVE_GETLOGIN_R + /* Define to 1 if you have the `getpid' function. */ #undef HAVE_GETPID @@ -358,9 +364,6 @@ /* Define to 1 if you have the `itoa' function. */ #undef HAVE_ITOA -/* Define if LFS (large file support) is available */ -#undef HAVE_LFS_SUPPORT - /* Define to 1 if you have the header file. */ #undef HAVE_LIBC_H @@ -557,12 +560,19 @@ typedef unsigned short ushort; sys/socket.h */ #undef HAVE_PROTOTYPE_CONNECT +/* Define if your system has a prototype for feenableexcept in fenv.h */ +#undef HAVE_PROTOTYPE_FEENABLEEXCEPT + /* Define if your system has a prototype for finite in math.h */ #undef HAVE_PROTOTYPE_FINITE /* Define if your system has a prototype for flock in sys/file.h */ #undef HAVE_PROTOTYPE_FLOCK +/* Define if your system has a prototype for gethostbyaddr_r in libc.h + unistd.h stdlib.h netdb.h */ +#undef HAVE_PROTOTYPE_GETHOSTBYADDR_R + /* Define if your system has a prototype for gethostbyname in libc.h unistd.h stdlib.h netdb.h */ #undef HAVE_PROTOTYPE_GETHOSTBYNAME @@ -677,6 +687,9 @@ typedef unsigned short ushort; /* Define if OpenSSL provides the RAND_egd function. */ #undef HAVE_RAND_EGD +/* Define to 1 if you have the `readdir_r' function. */ +#undef HAVE_READDIR_R + /* define if the compiler supports reinterpret_cast<> */ #undef HAVE_REINTERPRET_CAST @@ -756,6 +769,39 @@ typedef unsigned short ushort; /* Define if the compiler supports std::nothrow */ #undef HAVE_STD__NOTHROW +/* Define if STL's algorithm should be used. */ +#undef HAVE_STL_ALGORITHM + +/* Define if STL's limits should be used. */ +#undef HAVE_STL_LIMITS + +/* Define if STL's list should be used. */ +#undef HAVE_STL_LIST + +/* Define if STL's map should be used. */ +#undef HAVE_STL_MAP + +/* Define if STL's memory should be used. */ +#undef HAVE_STL_MEMORY + +/* Define if STL's stack should be used. */ +#undef HAVE_STL_STACK + +/* Define if STL's string should be used. */ +#undef HAVE_STL_STRING + +/* Define if STL's system_error should be used. */ +#undef HAVE_STL_SYSTEM_ERROR + +/* Define if STL's tuple should be used. */ +#undef HAVE_STL_TUPLE + +/* Define if STL's type traits should be used. */ +#undef HAVE_STL_TYPE_TRAITS + +/* Define if STL's vector should be used. */ +#undef HAVE_STL_VECTOR + /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR @@ -1102,10 +1148,9 @@ typedef unsigned short ushort; /* Define to int if undefined. */ #undef socklen_t -#if defined(DCMTK_USE_CXX11_STL) && defined(__cplusplus) && __cplusplus < 201103L +#if defined(HAVE_CXX11) && defined(__cplusplus) && __cplusplus < 201103L #error\ - DCMTK was configured to use the C++11 STL, but your compiler is not configured\ - for building with C++11 features. +DCMTK was configured to use C++11 features, but your compiler does not or was not configured to provide them. #endif #endif /* OSCONFIG_H */ diff --git a/config/stdcxx.m4 b/config/stdcxx.m4 new file mode 100644 index 00000000..f99ce541 --- /dev/null +++ b/config/stdcxx.m4 @@ -0,0 +1,980 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) +# +# DESCRIPTION +# +# Check for baseline language coverage in the compiler for the specified +# version of the C++ standard. If necessary, add switches to CXX and +# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard) +# or '14' (for the C++14 standard). +# +# The second argument, if specified, indicates whether you insist on an +# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. +# -std=c++11). If neither is specified, you get whatever works, with +# preference for an extended mode. +# +# The third argument, if specified 'mandatory' or if left unspecified, +# indicates that baseline support for the specified C++ standard is +# required and that the macro should error out if no mode with that +# support is found. If specified 'optional', then configuration proceeds +# regardless, after defining HAVE_CXX${VERSION} if and only if a +# supporting mode is found. +# +# LICENSE +# +# Copyright (c) 2008 Benjamin Kosnik +# Copyright (c) 2012 Zack Weinberg +# Copyright (c) 2013 Roy Stogner +# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov +# Copyright (c) 2015 Paul Norman +# Copyright (c) 2015 Moritz Klammler +# Copyright (c) 2016 Krzesimir Nowak +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro +dnl (serial version number 13). + +AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl + m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], + [$1], [14], [ax_cxx_compile_alternatives="14 1y"], + [$1], [17], [ax_cxx_compile_alternatives="17 1z"], + [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl + m4_if([$2], [], [], + [$2], [ext], [], + [$2], [noext], [], + [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl + m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], + [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], + [$3], [optional], [ax_cxx_compile_cxx$1_required=false], + [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) + AC_LANG_PUSH([C++])dnl + ac_success=no + AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, + ax_cv_cxx_compile_cxx$1, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [ax_cv_cxx_compile_cxx$1=yes], + [ax_cv_cxx_compile_cxx$1=no])]) + if test x$ax_cv_cxx_compile_cxx$1 = xyes; then + ac_success=yes + fi + + m4_if([$2], [noext], [], [dnl + if test x$ac_success = xno; then + for alternative in ${ax_cxx_compile_alternatives}; do + switch="-std=gnu++${alternative}" + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break + fi + done + fi]) + + m4_if([$2], [ext], [], [dnl + if test x$ac_success = xno; then + dnl HP's aCC needs +std=c++11 according to: + dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf + dnl Cray's crayCC needs "-h std=c++11" + for alternative in ${ax_cxx_compile_alternatives}; do + for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX $switch" + if test -n "$CXXCPP" ; then + CXXCPP="$CXXCPP $switch" + fi + ac_success=yes + break + fi + done + if test x$ac_success = xyes; then + break + fi + done + fi]) + AC_LANG_POP([C++]) + if test x$ax_cxx_compile_cxx$1_required = xtrue; then + if test x$ac_success = xno; then + AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.]) + fi + fi + if test x$ac_success = xno; then + HAVE_CXX$1=0 + AC_MSG_NOTICE([No compiler with C++$1 support was found]) + else + HAVE_CXX$1=1 + AC_DEFINE(HAVE_CXX$1,1, + [define if the compiler supports basic C++$1 syntax]) + fi + AC_SUBST(HAVE_CXX$1) +]) + + +dnl Test body for checking C++11 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 +) + + +dnl Test body for checking C++14 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 +) + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 + _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 +) + +dnl Tests for new features in C++11 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ + +// If the compiler admits that it is not ready for C++11, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201103L + +#error "This is not a C++11 compiler" + +#else + +namespace cxx11 +{ + + namespace test_static_assert + { + + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + } + + namespace test_final_override + { + + struct Base + { + virtual void f() {} + }; + + struct Derived : public Base + { + virtual void f() override {} + }; + + } + + namespace test_double_right_angle_brackets + { + + template < typename T > + struct check {}; + + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; + + } + + namespace test_decltype + { + + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } + + } + + namespace test_type_deduction + { + + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + + template < typename T > + struct is_same + { + static const bool value = true; + }; + + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L + +]]) + + +dnl Tests for new features in C++14 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ + +// If the compiler admits that it is not ready for C++14, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201402L + +#error "This is not a C++14 compiler" + +#else + +namespace cxx14 +{ + + namespace test_polymorphic_lambdas + { + + int + test() + { + const auto lambda = [](auto&&... args){ + const auto istiny = [](auto x){ + return (sizeof(x) == 1UL) ? 1 : 0; + }; + const int aretiny[] = { istiny(args)... }; + return aretiny[0]; + }; + return lambda(1, 1L, 1.0f, '1'); + } + + } + + namespace test_binary_literals + { + + constexpr auto ivii = 0b0000000000101010; + static_assert(ivii == 42, "wrong value"); + + } + + namespace test_generalized_constexpr + { + + template < typename CharT > + constexpr unsigned long + strlen_c(const CharT *const s) noexcept + { + auto length = 0UL; + for (auto p = s; *p; ++p) + ++length; + return length; + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("x") == 1UL, ""); + static_assert(strlen_c("test") == 4UL, ""); + static_assert(strlen_c("another\0test") == 7UL, ""); + + } + + namespace test_lambda_init_capture + { + + int + test() + { + auto x = 0; + const auto lambda1 = [a = x](int b){ return a + b; }; + const auto lambda2 = [a = lambda1(x)](){ return a; }; + return lambda2(); + } + + } + + namespace test_digit_separators + { + + constexpr auto ten_million = 100'000'000; + static_assert(ten_million == 100000000, ""); + + } + + namespace test_return_type_deduction + { + + auto f(int& x) { return x; } + decltype(auto) g(int& x) { return x; } + + template < typename T1, typename T2 > + struct is_same + { + static constexpr auto value = false; + }; + + template < typename T > + struct is_same + { + static constexpr auto value = true; + }; + + int + test() + { + auto x = 0; + static_assert(is_same::value, ""); + static_assert(is_same::value, ""); + return x; + } + + } + +} // namespace cxx14 + +#endif // __cplusplus >= 201402L + +]]) + + +dnl Tests for new features in C++17 + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ + +// If the compiler admits that it is not ready for C++17, why torture it? +// Hopefully, this will speed up the test. + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus <= 201402L + +#error "This is not a C++17 compiler" + +#else + +#if defined(__clang__) + #define REALLY_CLANG +#else + #if defined(__GNUC__) + #define REALLY_GCC + #endif +#endif + +#include +#include +#include + +namespace cxx17 +{ + +#if !defined(REALLY_CLANG) + namespace test_constexpr_lambdas + { + + // TODO: test it with clang++ from git + + constexpr int foo = [](){return 42;}(); + + } +#endif // !defined(REALLY_CLANG) + + namespace test::nested_namespace::definitions + { + + } + + namespace test_fold_expression + { + + template + int multiply(Args... args) + { + return (args * ... * 1); + } + + template + bool all(Args... args) + { + return (args && ...); + } + + } + + namespace test_extended_static_assert + { + + static_assert (true); + + } + + namespace test_auto_brace_init_list + { + + auto foo = {5}; + auto bar {5}; + + static_assert(std::is_same, decltype(foo)>::value); + static_assert(std::is_same::value); + } + + namespace test_typename_in_template_template_parameter + { + + template typename X> struct D; + + } + + namespace test_fallthrough_nodiscard_maybe_unused_attributes + { + + int f1() + { + return 42; + } + + [[nodiscard]] int f2() + { + [[maybe_unused]] auto unused = f1(); + + switch (f1()) + { + case 17: + f1(); + [[fallthrough]]; + case 42: + f1(); + } + return f1(); + } + + } + + namespace test_extended_aggregate_initialization + { + + struct base1 + { + int b1, b2 = 42; + }; + + struct base2 + { + base2() { + b3 = 42; + } + int b3; + }; + + struct derived : base1, base2 + { + int d; + }; + + derived d1 {{1, 2}, {}, 4}; // full initialization + derived d2 {{}, {}, 4}; // value-initialized bases + + } + + namespace test_general_range_based_for_loop + { + + struct iter + { + int i; + + int& operator* () + { + return i; + } + + const int& operator* () const + { + return i; + } + + iter& operator++() + { + ++i; + return *this; + } + }; + + struct sentinel + { + int i; + }; + + bool operator== (const iter& i, const sentinel& s) + { + return i.i == s.i; + } + + bool operator!= (const iter& i, const sentinel& s) + { + return !(i == s); + } + + struct range + { + iter begin() const + { + return {0}; + } + + sentinel end() const + { + return {5}; + } + }; + + void f() + { + range r {}; + + for (auto i : r) + { + [[maybe_unused]] auto v = i; + } + } + + } + + namespace test_lambda_capture_asterisk_this_by_value + { + + struct t + { + int i; + int foo() + { + return [*this]() + { + return i; + }(); + } + }; + + } + + namespace test_enum_class_construction + { + + enum class byte : unsigned char + {}; + + byte foo {42}; + + } + + namespace test_constexpr_if + { + + template + int f () + { + if constexpr(cond) + { + return 13; + } + else + { + return 42; + } + } + + } + + namespace test_selection_statement_with_initializer + { + + int f() + { + return 13; + } + + int f2() + { + if (auto i = f(); i > 0) + { + return 3; + } + + switch (auto i = f(); i + 4) + { + case 17: + return 2; + + default: + return 1; + } + } + + } + +#if !defined(REALLY_CLANG) + namespace test_template_argument_deduction_for_class_templates + { + + // TODO: test it with clang++ from git + + template + struct pair + { + pair (T1 p1, T2 p2) + : m1 {p1}, + m2 {p2} + {} + + T1 m1; + T2 m2; + }; + + void f() + { + [[maybe_unused]] auto p = pair{13, 42u}; + } + + } +#endif // !defined(REALLY_CLANG) + + namespace test_non_type_auto_template_parameters + { + + template + struct B + {}; + + B<5> b1; + B<'a'> b2; + + } + +#if !defined(REALLY_CLANG) + namespace test_structured_bindings + { + + // TODO: test it with clang++ from git + + int arr[2] = { 1, 2 }; + std::pair pr = { 1, 2 }; + + auto f1() -> int(&)[2] + { + return arr; + } + + auto f2() -> std::pair& + { + return pr; + } + + struct S + { + int x1 : 2; + volatile double y1; + }; + + S f3() + { + return {}; + } + + auto [ x1, y1 ] = f1(); + auto& [ xr1, yr1 ] = f1(); + auto [ x2, y2 ] = f2(); + auto& [ xr2, yr2 ] = f2(); + const auto [ x3, y3 ] = f3(); + + } +#endif // !defined(REALLY_CLANG) + +#if !defined(REALLY_CLANG) + namespace test_exception_spec_type_system + { + + // TODO: test it with clang++ from git + + struct Good {}; + struct Bad {}; + + void g1() noexcept; + void g2(); + + template + Bad + f(T*, T*); + + template + Good + f(T1*, T2*); + + static_assert (std::is_same_v); + + } +#endif // !defined(REALLY_CLANG) + + namespace test_inline_variables + { + + template void f(T) + {} + + template inline T g(T) + { + return T{}; + } + + template<> inline void f<>(int) + {} + + template<> int g<>(int) + { + return 5; + } + + } + +} // namespace cxx17 + +#endif // __cplusplus <= 201402L + +]]) \ No newline at end of file diff --git a/config/tests/algo.cc b/config/tests/algo.cc new file mode 100644 index 00000000..395c1027 --- /dev/null +++ b/config/tests/algo.cc @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Thorben Hasenpusch + * + * Purpose: Rudimentary tests for a working implementation + */ + +#include +#include + +struct X { + int *n; + + void operator()(int x) + { + ++*n; + } +}; + +int main() +{ + std::vector vec; + vec.push_back(1); + vec.push_back(2); + + int n = 0; + + X x; + x.n = &n; + + std::for_each(vec.begin(), vec.end(), x); + + if (n != 2) { + return -1; + } + + if (std::find(vec.begin(), vec.end(), 44) != vec.end()) { + return -1; + } + + if (std::adjacent_find(vec.begin(), vec.end()) != vec.end()) { + return -1; + } + + return 0; +} diff --git a/config/arith.cc b/config/tests/arith.cc similarity index 95% rename from config/arith.cc rename to config/tests/arith.cc index 78069444..b23d18a1 100644 --- a/config/arith.cc +++ b/config/tests/arith.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2014, OFFIS e.V. + * Copyright (C) 2014-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,18 +27,34 @@ #define INCLUDE_CMATH #define INCLUDE_CSETJMP #define INCLUDE_CSIGNAL -#include "math.cc" +#include "../math.cc" #ifdef HAVE_FENV_H // For controlling floating point exceptions on Unix like systems. #include #endif +#ifdef HAVE_IEEEFP_H +// For controlling floating point exceptions on Unix like systems +// that don't have feenableexcept and fedisableexcept. +#include +#endif + #ifdef __APPLE__ // For controlling floating point exceptions on OS X. #include #endif +#ifdef HAVE_SETJMP_H +// For setjmp for the SunPro compiler +#include +#endif + +#ifdef HAVE_SIGNAL_H +// For signal for the SunPro compiler +#include +#endif + // hackish definition of cout, as we can't depend on // OFConsole. #define COUT STD_NAMESPACE cout @@ -116,6 +132,7 @@ static int test_modulo() template static int test_trap( const FN& fn ) { + register_signals(); #ifndef _WIN32 // On Unix like systems, we use the // longjmp-module specifically designed for @@ -319,8 +336,11 @@ static void provoke_snan() _controlfp( _controlfp(0,0) & ~_EM_INVALID, _MCW_EM ); #elif defined(__APPLE__) _MM_SET_EXCEPTION_MASK( _MM_GET_EXCEPTION_MASK() & ~_MM_MASK_INVALID ); -#elif defined(HAVE_FENV_H) +#elif defined(HAVE_FENV_H) && defined(HAVE_PROTOTYPE_FEENABLEEXCEPT) feenableexcept( FE_INVALID ); +#elif defined(HAVE_IEEEFP_H) + fp_except cw = fpgetmask(); + fpsetmask(cw | FP_X_INV | FP_X_DZ | FP_X_OFL); #endif // Visual Studio will emit an exception the moment // we assign a signaling NaN to another float variable @@ -346,8 +366,11 @@ static int test_snan( STD_NAMESPACE ostream& out, const char* name ) feclearexcept( FE_INVALID ); #ifdef __APPLE__ _MM_SET_EXCEPTION_MASK( _MM_GET_EXCEPTION_MASK() | _MM_MASK_INVALID ); -#else +#elif defined(HAVE_FENV_H) && defined(HAVE_PROTOTYPE_FEENABLEEXCEPT) fedisableexcept( FE_INVALID ); +#elif defined(HAVE_IEEEFP_H) + fp_except cw = fpgetmask(); + fpsetmask(cw & ~(FP_X_INV | FP_X_DZ | FP_X_OFL)); #endif #endif // Print and return the result @@ -383,13 +406,6 @@ static void test_iec559( STD_NAMESPACE ostream& out, const char* name, int reqs ); } -#ifndef _WIN32 -template -static int is_subnormal( T t ) -{ - return !STD_NAMESPACE isnormal( t ); -} -#else static int is_subnormal( float f ) { // Wine does not implement _fpclassf, so don't use it when cross compiling for Windows @@ -397,15 +413,18 @@ static int is_subnormal( float f ) #if defined(HAVE_PROTOTYPE__FPCLASSF) && !( defined(DCMTK_CROSS_COMPILING) && defined(_WIN32) ) return ( _fpclassf( f ) & ( _FPCLASS_ND | _FPCLASS_PD ) ) != 0; #else - return (((unsigned char*)&f)[(FLT_MANT_DIG - 1) / 8] & (1u << ((FLT_MANT_DIG - 1) % 8))) == 0; + return f != 0.0f && ( f < 0.0f ? -f < FLT_MIN : f < FLT_MIN ); #endif } static int is_subnormal( double d ) { +#ifdef _WIN32 return ( _fpclass( d ) & ( _FPCLASS_ND | _FPCLASS_PD ) ) != 0; -} +#else + return d != 0.0 && ( d < 0.0 ? -d < DBL_MIN : d < DBL_MIN ); #endif +} template static void test_subnormal( STD_NAMESPACE ostream& out, const char* name ) @@ -536,7 +555,6 @@ int main( int argc, char** argv ) << STD_NAMESPACE setw(7) << STD_NAMESPACE internal << "TRAPS" << STD_NAMESPACE setw(7) << STD_NAMESPACE internal << "MODULO" << OFendl; - register_signals(); inspect( out, "char" ); inspect( out, "signed char" ); inspect( out, "unsigned char" ); diff --git a/config/tests/cxx11.cc b/config/tests/cxx11.cc new file mode 100644 index 00000000..e1d023d9 --- /dev/null +++ b/config/tests/cxx11.cc @@ -0,0 +1,303 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Thorben Hasenpusch + * + * Purpose: Presents constructs that every C++11 compliant + * compiler should be able to compile. + */ + +#ifndef __cplusplus + +#error "This is not a C++ compiler" + +#elif __cplusplus < 201103L + +#error "This is not a C++11 compiler" + +#else + +int main() +{ + return 0; +} + +namespace cxx11 +{ + + namespace test_static_assert + { + + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + } + + namespace test_final_override + { + + struct Base + { + virtual void f() {} + }; + + struct Derived : public Base + { + virtual void f() override {} + }; + + } + + namespace test_double_right_angle_brackets + { + + template < typename T > + struct check {}; + + typedef check single_type; + typedef check> double_type; + typedef check>> triple_type; + typedef check>>> quadruple_type; + + } + + namespace test_decltype + { + + int + f() + { + int a = 1; + decltype(a) b = 2; + return a + b; + } + + } + + namespace test_type_deduction + { + + template < typename T1, typename T2 > + struct is_same + { + static const bool value = false; + }; + + template < typename T > + struct is_same + { + static const bool value = true; + }; + + template < typename T1, typename T2 > + auto + add(T1 a1, T2 a2) -> decltype(a1 + a2) + { + return a1 + a2; + } + + int + test(const int c, volatile int v) + { + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == false, ""); + auto ac = c; + auto av = v; + auto sumi = ac + av + 'x'; + auto sumf = ac + av + 1.0; + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == true, ""); + static_assert(is_same::value == false, ""); + static_assert(is_same::value == true, ""); + return (sumf > 0.0) ? sumi : add(c, v); + } + + } + + namespace test_noexcept + { + + int f() { return 0; } + int g() noexcept { return 0; } + + static_assert(noexcept(f()) == false, ""); + static_assert(noexcept(g()) == true, ""); + + } + + namespace test_constexpr + { + + template < typename CharT > + unsigned long constexpr + strlen_c_r(const CharT *const s, const unsigned long acc) noexcept + { + return *s ? strlen_c_r(s + 1, acc + 1) : acc; + } + + template < typename CharT > + unsigned long constexpr + strlen_c(const CharT *const s) noexcept + { + return strlen_c_r(s, 0UL); + } + + static_assert(strlen_c("") == 0UL, ""); + static_assert(strlen_c("1") == 1UL, ""); + static_assert(strlen_c("example") == 7UL, ""); + static_assert(strlen_c("another\0example") == 7UL, ""); + + } + + namespace test_rvalue_references + { + + template < int N > + struct answer + { + static constexpr int value = N; + }; + + answer<1> f(int&) { return answer<1>(); } + answer<2> f(const int&) { return answer<2>(); } + answer<3> f(int&&) { return answer<3>(); } + + void + test() + { + int i = 0; + const int c = 0; + static_assert(decltype(f(i))::value == 1, ""); + static_assert(decltype(f(c))::value == 2, ""); + static_assert(decltype(f(0))::value == 3, ""); + } + + } + + namespace test_uniform_initialization + { + + struct test + { + static const int zero {}; + static const int one {1}; + }; + + static_assert(test::zero == 0, ""); + static_assert(test::one == 1, ""); + + } + + namespace test_lambdas + { + + void + test1() + { + auto lambda1 = [](){}; + auto lambda2 = lambda1; + lambda1(); + lambda2(); + } + + int + test2() + { + auto a = [](int i, int j){ return i + j; }(1, 2); + auto b = []() -> int { return '0'; }(); + auto c = [=](){ return a + b; }(); + auto d = [&](){ return c; }(); + auto e = [a, &b](int x) mutable { + const auto identity = [](int y){ return y; }; + for (auto i = 0; i < a; ++i) + a += b--; + return x + identity(a + b); + }(0); + return a + b + c + d + e; + } + + int + test3() + { + const auto nullary = [](){ return 0; }; + const auto unary = [](int x){ return x; }; + using nullary_t = decltype(nullary); + using unary_t = decltype(unary); + const auto higher1st = [](nullary_t f){ return f(); }; + const auto higher2nd = [unary](nullary_t f1){ + return [unary, f1](unary_t f2){ return f2(unary(f1())); }; + }; + return higher1st(nullary) + higher2nd(nullary)(unary); + } + + } + + namespace test_variadic_templates + { + + template + struct sum; + + template + struct sum + { + static constexpr auto value = N0 + sum::value; + }; + + template <> + struct sum<> + { + static constexpr auto value = 0; + }; + + static_assert(sum<>::value == 0, ""); + static_assert(sum<1>::value == 1, ""); + static_assert(sum<23>::value == 23, ""); + static_assert(sum<1, 2>::value == 3, ""); + static_assert(sum<5, 5, 11>::value == 21, ""); + static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); + + } + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function + // because of this. + namespace test_template_alias_sfinae + { + + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test(); + + void test() { func(0); } + + } + +} // namespace cxx11 + +#endif // __cplusplus >= 201103L diff --git a/config/tests/lfs.c b/config/tests/lfs.c new file mode 100644 index 00000000..b7441c0e --- /dev/null +++ b/config/tests/lfs.c @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Jan Schlamelcher + * + * Purpose: Testing for large file support (LFS) + */ + +#include +/* Check that off_t can represent 2**63 - 1 correctly. */ +/* We can't simply define LARGE_OFF_T to be 9223372036854775807, */ +/* since some C++ compilers masquerading as C compilers */ +/* incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +int main() +{ + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; + return 0; +} diff --git a/config/tests/lfs64.cc b/config/tests/lfs64.cc new file mode 100644 index 00000000..f6cd3299 --- /dev/null +++ b/config/tests/lfs64.cc @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Jan Schlamelcher + * + * Purpose: Testing for explicit large file support (LFS64) + */ + +#define _LARGEFILE64_SOURCE +#include + +using namespace std; + +int main() +{ + FILE *f = fopen64("name", "r"); + return 0; +} diff --git a/config/tests/limits.cc b/config/tests/limits.cc new file mode 100644 index 00000000..b3aa762f --- /dev/null +++ b/config/tests/limits.cc @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Thorben Hasenpusch + * + * Purpose: Rudimentary tests for a working implementation. + */ + +#include +#include + +int main() +{ + if (!std::numeric_limits::is_signed) { + return -1; + } + + if (std::numeric_limits::is_iec559) { + if (!std::numeric_limits::has_infinity) { + return -1; + } + } + + if (std::numeric_limits::max() != INT_MAX) { + return -1; + } + + if (std::numeric_limits::digits != CHAR_BIT * sizeof(int) - 1) { + return -1; + } + + return 0; +} diff --git a/config/tests/list.cc b/config/tests/list.cc new file mode 100644 index 00000000..110d5935 --- /dev/null +++ b/config/tests/list.cc @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Thorben Hasenpusch + * + * Purpose: Rudimentary tests for a working implementation. + */ + +#include + +int main() +{ + std::list l; + + if (!l.empty()) { + return -1; + } + + l.push_back(18); + l.push_back(22); + l.push_front(2); + + if (*l.begin() != 2) { + return -1; + } + + l.reverse(); + + if (*l.begin() != 22) { + return -1; + } + + int sum = 0; + for (std::list::iterator it = l.begin(); it != l.end(); ++it) { + sum += *it; + } + + if (sum != 42) { + return -1; + } + + // ensure iterators are NOT invalidated by swap() + std::list::iterator it = l.begin(); + std::list m; + m.push_back(23); + l.swap(m); + if (it != m.begin()) { + return -1; + } + + // test whether we can compare const and mutable iterators + std::list::const_iterator cit = m.begin(); + if (it != cit) { + return -1; + } + + return 0; +} diff --git a/config/tests/map.cc b/config/tests/map.cc new file mode 100644 index 00000000..408df652 --- /dev/null +++ b/config/tests/map.cc @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Thorben Hasenpusch + * + * Purpose: Rudimentary tests for a working implementation. + */ + +#include + +int main() +{ + std::map m; + + if (!m.empty()) { + return -1; + } + + m[3] = 555; + m[66] = 2; + m[42] = 42; + + if (m.size() != 3) { + return -1; + } + + if (m[3] != 555) { + return -1; + } + + if (m[42] != 42) { + return -1; + } + + m.erase(m.find(3)); + + if (m.find(3) != m.end()) { + return -1; + } + + m.clear(); + + if (!m.empty()) { + return -1; + } + + return 0; +} diff --git a/config/tests/memory.cc b/config/tests/memory.cc new file mode 100644 index 00000000..d7656fef --- /dev/null +++ b/config/tests/memory.cc @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Thorben Hasenpusch + * + * Purpose: Rudimentary tests for a working implementation. + */ + +#include + +int main() +{ + int *p = new int(55); + + std::unique_ptr pp(p); + + if (*p != *pp) { + return -1; + } + + if (p != pp.get()) { + return -1; + } + + pp.release(); + + std::shared_ptr s_p(p); + std::shared_ptr s_p2(s_p); + std::shared_ptr s_p3(s_p2); + + if (s_p.get() != s_p3.get()) { + return -1; + } + + if (s_p.use_count() != 3) { + return -1; + } + + if (*s_p != *s_p3) { + return -1; + } + + return 0; +} diff --git a/config/tests/stack.cc b/config/tests/stack.cc new file mode 100644 index 00000000..bbb8e752 --- /dev/null +++ b/config/tests/stack.cc @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Thorben Hasenpusch + * + * Purpose: Rudimentary tests for a working implementation. + */ + +#include + +int main() +{ + std::stack s; + + if (!s.empty()) { + return -1; + } + + s.push(1); + s.push(2); + s.push(3); + + s.pop(); + s.pop(); + + s.push(42); + + if (s.top() != 42) { + return -1; + } + + return 0; +} diff --git a/config/tests/string.cc b/config/tests/string.cc new file mode 100644 index 00000000..4dd40fe2 --- /dev/null +++ b/config/tests/string.cc @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Thorben Hasenpusch + * + * Purpose: Rudimentary tests for a working implementation. + */ + +#include + +int main() +{ + std::string s = "TEST"; + + if (s[1] != 'E') { + return -1; + } + + s += "HAHA"; + + if (s[5] != 'A') { + return -1; + } + + std::string sub = s.substr(4); + + if ("HAHA" != sub) { + return -1; + } + + s.replace(0, 4, "HAHA"); + + if (s != "HAHAHAHA") { + return -1; + } + + return 0; +} diff --git a/config/tests/syserr.cc b/config/tests/syserr.cc new file mode 100644 index 00000000..1a5e848f --- /dev/null +++ b/config/tests/syserr.cc @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Thorben Hasenpusch + * + * Purpose: Rudimentary tests for a working implementation. + */ + +#include + +#include + +#ifdef _WIN32 +#include +#endif + +int main() +{ + // Not much to test, really. + + if (strcmp(std::generic_category().name(), "generic") != 0) { + return -1; + } + + if (strcmp(std::system_category().name(), "system") != 0) { + return -1; + } + +#ifdef _WIN32 + // Visual Studio might be using strerror for both categories. + + // Test with the highest numbered WINAPI error code; highly unlikely that there exists an equal-numbered errno. + std::system_error system_err(ERROR_API_UNAVAILABLE, std::system_category()); + std::system_error generic_err(ERROR_API_UNAVAILABLE, std::generic_category()); + + // The system error message should be retrieved using FormatMessage(), + // while the generic error message should be retrieved with strerror and be something like "unknown error", + // since it isn't a valid errno. + // The point is, these two should result in different messages. + + if (strcmp(system_err.what(), generic_err.what()) == 0) { + // Visual Studio messed up, what a surprise... + return -1; + } +#endif + return 0; +} diff --git a/config/tests/ttraits.cc b/config/tests/ttraits.cc new file mode 100644 index 00000000..3be4e0fb --- /dev/null +++ b/config/tests/ttraits.cc @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Thorben Hasenpusch + * + * Purpose: Rudimentary tests for a working implementation. + */ + +#include + +class A{}; + +class B{ virtual ~B(); }; + +int main() +{ + if (!std::is_void::value) { + return -1; + } + + if (!std::is_pointer::value) { + return -1; + } + + if (!std::is_class::value) { + return -1; + } + + if (!std::is_volatile::value) { + return -1; + } + + if (!std::is_empty::value) { + return -1; + } + + if (!std::has_virtual_destructor::value) { + return -1; + } + + if (std::is_empty::value) { + return -1; + } + + if (std::is_const>::value) { + return -1; + } + + if (!std::is_same::value, int>::type, int>::value) { + return -1; + } + + return 0; +} diff --git a/config/tests/tuple.cc b/config/tests/tuple.cc new file mode 100644 index 00000000..b7516e00 --- /dev/null +++ b/config/tests/tuple.cc @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Thorben Hasenpusch + * + * Purpose: Rudimentary tests for a working implementation. + */ + +#include + +int main() +{ + auto tuple = std::make_tuple(1, "TEST"); + + if (std::get<0>(tuple) != 1) { + return -1; + } + + if (std::tuple_size::value != 2) { + return -1; + } + + int n; + const char *p; + std::tie(n, p) = tuple; + + if (n != 1) { + return -1; + } + + // ensure std::tuple can take at least 50 template arguments, otherwise + // our own implementation is superior + std::tuple t; + + return 0; +} diff --git a/config/tests/vector.cc b/config/tests/vector.cc new file mode 100644 index 00000000..3d676a98 --- /dev/null +++ b/config/tests/vector.cc @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: config + * + * Author: Thorben Hasenpusch + * + * Purpose: Rudimentary tests for a working implementation. + */ + +#include + +struct Recursive : std::vector +{ + int i; +}; + +int main() +{ + std::vector v; + + v.push_back(1); + v.push_back(2); + v.push_back(3); + + if (v.size() != 3) { + return -1; + } + + if (v[2] != 3) { + return -1; + } + + v.erase(v.begin()); + + if (v[0] != 2) { + return -1; + } + + v.pop_back(); + + if (v.size() != 1) { + return -1; + } + + v.clear(); + + v.push_back(42); + v.push_back(13); + + v.resize(1); + + if (v.size() != 1 || v[0] != 42) { + return -1; + } + + if (v.front() != v[0]) { + return -1; + } + + if (v.back() != v[v.size() - 1]) { + return -1; + } + + // ensure iterators are NOT invalidated by swap() + std::vector::iterator it = v.begin(); + std::vector w; + w.push_back(23); + v.swap(w); + if (it != w.begin()) { + return -1; + } + + // test if recursive vector structures can be constructed without causing + // a stack overflow + if (std::vector().size() != 0) { + return -1; + } + + // test whether we can compare const and mutable iterators + std::vector::const_iterator cit = w.begin(); + if (it != cit) { + return -1; + } + + return 0; +} diff --git a/dcmdata/CMakeLists.txt b/dcmdata/CMakeLists.txt index 3a78f5dd..ded9ea97 100644 --- a/dcmdata/CMakeLists.txt +++ b/dcmdata/CMakeLists.txt @@ -2,7 +2,7 @@ PROJECT(dcmdata) # declare include directories which hold for all subdirectories -INCLUDE_DIRECTORIES(${dcmdata_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${ZLIB_INCDIR}) +INCLUDE_DIRECTORIES("${dcmdata_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" ${ZLIB_INCDIR}) # recurse into subdirectories FOREACH(SUBDIR libsrc libi2d apps include docs data tests) diff --git a/dcmdata/apps/Makefile.dep b/dcmdata/apps/Makefile.dep index 03bd8513..b0d4f217 100644 --- a/dcmdata/apps/Makefile.dep +++ b/dcmdata/apps/Makefile.dep @@ -18,7 +18,10 @@ dcm2json.o: dcm2json.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -36,10 +39,10 @@ dcm2json.o: dcm2json.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ @@ -55,8 +58,6 @@ dcm2json.o: dcm2json.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -80,8 +81,7 @@ dcm2json.o: dcm2json.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrof.h ../include/dcmtk/dcmdata/dcvrod.h \ ../include/dcmtk/dcmdata/dcvrol.h ../include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmdata/dcjson.h \ - ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h + ../../ofstd/include/dcmtk/ofstd/ofchrenc.h dcm2pdf.o: dcm2pdf.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dctypes.h \ @@ -102,7 +102,10 @@ dcm2pdf.o: dcm2pdf.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -120,10 +123,10 @@ dcm2pdf.o: dcm2pdf.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ @@ -139,8 +142,6 @@ dcm2pdf.o: dcm2pdf.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -184,7 +185,10 @@ dcm2xml.o: dcm2xml.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -202,10 +206,10 @@ dcm2xml.o: dcm2xml.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ @@ -221,8 +225,6 @@ dcm2xml.o: dcm2xml.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -245,8 +247,7 @@ dcm2xml.o: dcm2xml.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrfl.h ../include/dcmtk/dcmdata/dcvrfd.h \ ../include/dcmtk/dcmdata/dcvrof.h ../include/dcmtk/dcmdata/dcvrod.h \ ../include/dcmtk/dcmdata/dcvrol.h ../include/dcmtk/dcmdata/cmdlnarg.h \ - ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h + ../../ofstd/include/dcmtk/ofstd/ofchrenc.h dcmconv.o: dcmconv.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dctypes.h \ @@ -267,7 +268,10 @@ dcmconv.o: dcmconv.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -285,10 +289,10 @@ dcmconv.o: dcmconv.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ @@ -304,8 +308,6 @@ dcmconv.o: dcmconv.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -329,8 +331,7 @@ dcmconv.o: dcmconv.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrof.h ../include/dcmtk/dcmdata/dcvrod.h \ ../include/dcmtk/dcmdata/dcvrol.h ../include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmdata/dcostrmz.h ../include/dcmtk/dcmdata/dcistrmz.h \ - ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h + ../../ofstd/include/dcmtk/ofstd/ofchrenc.h dcmcrle.o: dcmcrle.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dctypes.h \ @@ -351,7 +352,10 @@ dcmcrle.o: dcmcrle.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -369,10 +373,10 @@ dcmcrle.o: dcmcrle.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ @@ -388,8 +392,6 @@ dcmcrle.o: dcmcrle.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -433,7 +435,10 @@ dcmdrle.o: dcmdrle.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -451,10 +456,10 @@ dcmdrle.o: dcmdrle.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ @@ -470,8 +475,6 @@ dcmdrle.o: dcmdrle.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -515,7 +518,10 @@ dcmdump.o: dcmdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -533,10 +539,10 @@ dcmdump.o: dcmdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ @@ -552,8 +558,6 @@ dcmdump.o: dcmdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -577,8 +581,7 @@ dcmdump.o: dcmdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrof.h ../include/dcmtk/dcmdata/dcvrod.h \ ../include/dcmtk/dcmdata/dcvrol.h ../include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmdata/dcistrmz.h \ - ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h + ../../ofstd/include/dcmtk/ofstd/ofchrenc.h dcmftest.o: dcmftest.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmdata/dcmetinf.h ../include/dcmtk/dcmdata/dcitem.h \ @@ -595,6 +598,7 @@ dcmftest.o: dcmftest.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -607,7 +611,9 @@ dcmftest.o: dcmftest.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -649,7 +655,10 @@ dcmgpdir.o: dcmgpdir.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -667,10 +676,10 @@ dcmgpdir.o: dcmgpdir.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ @@ -686,8 +695,6 @@ dcmgpdir.o: dcmgpdir.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -732,7 +739,10 @@ dcmodify.o: dcmodify.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -750,9 +760,9 @@ dcmodify.o: dcmodify.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcpath.h ../include/dcmtk/dcmdata/dcdatset.h \ @@ -774,6 +784,7 @@ dump2dcm.o: dump2dcm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ @@ -791,7 +802,9 @@ dump2dcm.o: dump2dcm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -817,8 +830,6 @@ dump2dcm.o: dump2dcm.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -862,6 +873,7 @@ img2dcm.o: img2dcm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcfilefo.h \ ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ @@ -879,7 +891,9 @@ img2dcm.o: img2dcm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -927,7 +941,10 @@ mdfconen.o: mdfconen.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -945,9 +962,9 @@ mdfconen.o: mdfconen.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h mdfdsman.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dctk.h \ @@ -963,8 +980,6 @@ mdfconen.o: mdfconen.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \ ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -1010,7 +1025,10 @@ mdfdsman.o: mdfdsman.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1028,9 +1046,9 @@ mdfdsman.o: mdfdsman.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dcswap.h \ @@ -1045,8 +1063,6 @@ mdfdsman.o: mdfdsman.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -1090,7 +1106,10 @@ pdf2dcm.o: pdf2dcm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1108,10 +1127,10 @@ pdf2dcm.o: pdf2dcm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ @@ -1127,8 +1146,6 @@ pdf2dcm.o: pdf2dcm.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -1172,7 +1189,10 @@ xml2dcm.o: xml2dcm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1190,10 +1210,10 @@ xml2dcm.o: xml2dcm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcswap.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ @@ -1209,8 +1229,6 @@ xml2dcm.o: xml2dcm.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ diff --git a/dcmdata/apps/Makefile.in b/dcmdata/apps/Makefile.in index c68bb0c1..b91ee581 100644 --- a/dcmdata/apps/Makefile.in +++ b/dcmdata/apps/Makefile.in @@ -18,7 +18,7 @@ oflogdir = $(top_srcdir)/../oflog LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include LIBDIRS = -L$(top_srcdir)/libi2d -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc \ -L$(oflogdir)/libsrc -LOCALLIBS = -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS) +LOCALLIBS = -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS) LIBI2D = -li2d objs = dcmftest.o dcmconv.o dcmdump.o dump2dcm.o dcmgpdir.o dcm2xml.o \ @@ -33,46 +33,46 @@ all: $(progs) # Note: dcmftest does not need LOCALLIBS on most platforms, but on OSF1 it is required. dcmftest: dcmftest.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcmconv: dcmconv.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcmdump: dcmdump.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dump2dcm: dump2dcm.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcmgpdir: dcmgpdir.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcmcrle: dcmcrle.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcmdrle: dcmdrle.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcm2xml: dcm2xml.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) xml2dcm: xml2dcm.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(XMLLIBS) $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(XMLLIBS) $(LOCALLIBS) $(LIBS) dcmodify: dcmodify.o mdfconen.o mdfdsman.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o mdfconen.o mdfdsman.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o mdfconen.o mdfdsman.o $(LOCALLIBS) $(LIBS) pdf2dcm: pdf2dcm.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcm2pdf: dcm2pdf.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) img2dcm: img2dcm.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LIBI2D) $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LIBI2D) $(LOCALLIBS) $(LIBS) dcm2json: dcm2json.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) install: install-bin diff --git a/dcmdata/apps/dcm2json.cc b/dcmdata/apps/dcm2json.cc index 3a6c8c53..14d4321d 100644 --- a/dcmdata/apps/dcm2json.cc +++ b/dcmdata/apps/dcm2json.cc @@ -51,8 +51,7 @@ static OFCondition writeFile(STD_NAMESPACE ostream &out, DcmFileFormat *dfile, const E_FileReadMode readMode, const OFBool format, - const OFBool printMetaheaderInformation, - const OFBool checkAllStrings) + const OFBool printMetaInfo) { OFCondition result = EC_IllegalParameter; if ((ifname != NULL) && (dfile != NULL)) @@ -65,18 +64,18 @@ static OFCondition writeFile(STD_NAMESPACE ostream &out, { result = format ? - dset->writeJson(out, DcmJsonFormatPretty(printMetaheaderInformation)) + dset->writeJson(out, DcmJsonFormatPretty(printMetaInfo)) : - dset->writeJson(out, DcmJsonFormatCompact(printMetaheaderInformation)) + dset->writeJson(out, DcmJsonFormatCompact(printMetaInfo)) ; } else { result = format ? - dfile->writeJson(out, DcmJsonFormatPretty(printMetaheaderInformation)) + dfile->writeJson(out, DcmJsonFormatPretty(printMetaInfo)) : - dfile->writeJson(out, DcmJsonFormatCompact(printMetaheaderInformation)) + dfile->writeJson(out, DcmJsonFormatCompact(printMetaInfo)) ; } } @@ -88,7 +87,6 @@ static OFCondition writeFile(STD_NAMESPACE ostream &out, int main(int argc, char *argv[]) { - OFBool opt_checkAllStrings = OFFalse; OFBool opt_format = OFTrue; OFBool opt_addMetaInformation = OFFalse; @@ -123,9 +121,9 @@ int main(int argc, char *argv[]) cmd.addGroup("output options:"); cmd.addSubGroup("output format:"); - cmd.addOption("--formatted-code", "+fc", "output file with human readable formatting (def.)"); - cmd.addOption("--compact-code", "-fc", "output without formatting (single line of code)"); - cmd.addOption("--write-meta", "+m", "write data set with meta information"); + cmd.addOption("--formatted-code", "+fc", "enable whitespace formatting (default)"); + cmd.addOption("--compact-code", "-fc", "print only required characters"); + cmd.addOption("--write-meta", "+m", "write data set with meta information\n(warning: not conforming to the DICOM standard)"); /* evaluate command line */ prepareCmdLineArgs(argc, argv, OFFIS_CONSOLE_APPLICATION); @@ -195,7 +193,10 @@ int main(int argc, char *argv[]) /* meta option */ if (cmd.findOption("--write-meta")) + { + app.checkConflict("--write-meta", "--read-dataset", opt_readMode == ERM_dataset); opt_addMetaInformation = OFTrue; + } } /* print resource identifier */ @@ -252,8 +253,7 @@ int main(int argc, char *argv[]) if (stream.good()) { /* write content in JSON format to file */ - if (writeFile(stream, ifname, &dfile, opt_readMode, opt_format, - opt_addMetaInformation, opt_checkAllStrings).bad()) + if (writeFile(stream, ifname, &dfile, opt_readMode, opt_format, opt_addMetaInformation).bad()) result = 2; } else @@ -262,8 +262,7 @@ int main(int argc, char *argv[]) else { /* write content in JSON format to standard output */ - if (writeFile(COUT, ifname, &dfile, opt_readMode, opt_format, - opt_addMetaInformation, opt_checkAllStrings).bad()) + if (writeFile(COUT, ifname, &dfile, opt_readMode, opt_format, opt_addMetaInformation).bad()) result = 3; } } diff --git a/dcmdata/apps/dcmconv.cc b/dcmdata/apps/dcmconv.cc index 46556dfa..601143c3 100644 --- a/dcmdata/apps/dcmconv.cc +++ b/dcmdata/apps/dcmconv.cc @@ -26,10 +26,6 @@ #define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" @@ -84,12 +80,6 @@ static DcmTagKey parseTagKey(const char *tagName) int main(int argc, char *argv[]) { - -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - const char *opt_ifname = NULL; const char *opt_ofname = NULL; @@ -210,6 +200,7 @@ int main(int argc, char *argv[]) #ifdef WITH_ZLIB cmd.addOption("--write-xfer-deflated", "+td", "write with deflated explicit VR little endian TS"); #endif + cmd.addOption("--write-xfer-ge", "+tg", "write private GE LEI with big endian pixel TS\n(non-standard)"); cmd.addSubGroup("post-1993 value representations:"); cmd.addOption("--enable-new-vr", "+u", "enable support for new VRs (UN/UT) (default)"); cmd.addOption("--disable-new-vr", "-u", "disable support for new VRs, convert to OB"); @@ -496,6 +487,7 @@ int main(int argc, char *argv[]) #ifdef WITH_ZLIB if (cmd.findOption("--write-xfer-deflated")) opt_oxfer = EXS_DeflatedLittleEndianExplicit; #endif + if (cmd.findOption("--write-xfer-ge")) opt_oxfer = EXS_PrivateGE_LEI_WithBigEndianPixelData; cmd.endOptionBlock(); cmd.beginOptionBlock(); diff --git a/dcmdata/apps/dcmcrle.cc b/dcmdata/apps/dcmcrle.cc index 58f75b34..511f2f43 100644 --- a/dcmdata/apps/dcmcrle.cc +++ b/dcmdata/apps/dcmcrle.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2014, OFFIS e.V. + * Copyright (C) 2002-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,10 +26,6 @@ #define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" @@ -56,11 +52,6 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" int main(int argc, char *argv[]) { -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - const char *opt_ifname = NULL; const char *opt_ofname = NULL; diff --git a/dcmdata/apps/dcmdrle.cc b/dcmdata/apps/dcmdrle.cc index 30c6dc52..52086ff1 100644 --- a/dcmdata/apps/dcmdrle.cc +++ b/dcmdata/apps/dcmdrle.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2014, OFFIS e.V. + * Copyright (C) 2002-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,10 +26,6 @@ #define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" @@ -56,11 +52,6 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" int main(int argc, char *argv[]) { -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - const char *opt_ifname = NULL; const char *opt_ofname = NULL; diff --git a/dcmdata/apps/dcmdump.cc b/dcmdata/apps/dcmdump.cc index bd3a7600..3ba46432 100644 --- a/dcmdata/apps/dcmdump.cc +++ b/dcmdata/apps/dcmdump.cc @@ -55,12 +55,6 @@ static OFLogger dcmdumpLogger = OFLog::getLogger("dcmtk.apps." OFFIS_CONSOLE_APP static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" OFFIS_DCMTK_VERSION " " OFFIS_DCMTK_RELEASEDATE " $"; -#ifdef HAVE_GUSI_H -/* needed for Macintosh */ -#include -#include -#endif - static int dumpFile(STD_NAMESPACE ostream &out, const OFFilename &ifname, const E_FileReadMode readMode, @@ -69,6 +63,7 @@ static int dumpFile(STD_NAMESPACE ostream &out, const OFBool loadIntoMemory, const OFBool stopOnErrors, const OFBool convertToUTF8, + const DcmTagKey &stopParsingAtElement, const char *pixelDirectory); // ******************************************** @@ -162,18 +157,7 @@ DCMTK_MAIN_FUNCTION const char *scanPattern = ""; const char *pixelDirectory = NULL; OFBool convertToUTF8 = OFFalse; - -#ifdef HAVE_GUSI_H - /* needed for Macintosh */ - /* set options for the Metrowerks CodeWarrior SIOUX console */ - SIOUXSettings.autocloseonquit = OFFalse; - SIOUXSettings.asktosaveonclose = OFFalse; - SIOUXSettings.showstatusline = OFTrue; - SIOUXSettings.setupmenus = OFTrue; - /* set options for the GUSI sockets library */ - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif + DcmTagKey stopParsingBeforeElement = DCM_UndefinedTagKey; OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION, "Dump DICOM file and data set", rcsid); OFCommandLine cmd; @@ -250,6 +234,8 @@ DCMTK_MAIN_FUNCTION cmd.addSubGroup("other parsing options:"); cmd.addOption("--stop-after-elem", "+st", 1, "[t]ag: \"gggg,eeee\" or dictionary name", "stop parsing after element specified by t"); + cmd.addOption("--stop-before-elem", "+sb", 1, "[t]ag: \"gggg,eeee\" or dictionary name", + "stop parsing before element specified by t"); cmd.addSubGroup("automatic data correction:"); cmd.addOption("--enable-correction", "+dc", "enable automatic data correction (default)"); cmd.addOption("--disable-correction", "-dc", "disable automatic data correction"); @@ -597,6 +583,7 @@ DCMTK_MAIN_FUNCTION if (cmd.findOption("--ignore-errors")) stopOnErrors = OFFalse; cmd.endOptionBlock(); + cmd.beginOptionBlock(); if (cmd.findOption("--stop-after-elem")) { const char *tagName = NULL; @@ -607,6 +594,17 @@ DCMTK_MAIN_FUNCTION else app.printError("no valid key given for option --stop-after-elem"); } + if (cmd.findOption("--stop-before-elem")) + { + const char *tagName = NULL; + app.checkValue(cmd.getValue(tagName)); + DcmTagKey key = parseTagKey(tagName); + if (key != DCM_UndefinedTagKey) + stopParsingBeforeElement = key; + else + app.printError("no valid key given for option --stop-before-elem"); + } + cmd.endOptionBlock(); if (cmd.findOption("--search", 0, OFCommandLine::FOM_FirstFromLeft)) { @@ -720,7 +718,7 @@ DCMTK_MAIN_FUNCTION /* print header with filename */ COUT << "# " << OFFIS_CONSOLE_APPLICATION << " (" << fileCounter << "/" << count << "): " << current << OFendl; } - errorCount += dumpFile(COUT, current, readMode, xfer, printFlags, loadIntoMemory, stopOnErrors, convertToUTF8, pixelDirectory); + errorCount += dumpFile(COUT, current, readMode, xfer, printFlags, loadIntoMemory, stopOnErrors, convertToUTF8, stopParsingBeforeElement, pixelDirectory); } return errorCount; @@ -765,6 +763,7 @@ static int dumpFile(STD_NAMESPACE ostream &out, const OFBool loadIntoMemory, const OFBool stopOnErrors, const OFBool convertToUTF8, + const DcmTagKey &stopParsingAtElement, const char *pixelDirectory) { int result = 0; @@ -778,7 +777,17 @@ static int dumpFile(STD_NAMESPACE ostream &out, DcmFileFormat dfile; DcmObject *dset = &dfile; if (readMode == ERM_dataset) dset = dfile.getDataset(); - OFCondition cond = dfile.loadFile(ifname, xfer, EGL_noChange, OFstatic_cast(Uint32, maxReadLength), readMode); + OFCondition cond; + + if (stopParsingAtElement == DCM_UndefinedTagKey) + { + cond = dfile.loadFile(ifname, xfer, EGL_noChange, OFstatic_cast(Uint32, maxReadLength), readMode); + } + else + { + // instead of using loadFile(), we call loadFileUntilTag(). + cond = dfile.loadFileUntilTag(ifname, xfer, EGL_noChange, OFstatic_cast(Uint32, maxReadLength), readMode, stopParsingAtElement); + } if (cond.bad()) { OFLOG_ERROR(dcmdumpLogger, OFFIS_CONSOLE_APPLICATION << ": " << cond.text() diff --git a/dcmdata/apps/dump2dcm.cc b/dcmdata/apps/dump2dcm.cc index a2181cf4..a863df79 100644 --- a/dcmdata/apps/dump2dcm.cc +++ b/dcmdata/apps/dump2dcm.cc @@ -87,9 +87,6 @@ #ifdef HAVE_SYS_TYPES_H #include #endif -#ifdef HAVE_GUSI_H -#include -#endif #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/ofstd/ofconapp.h" @@ -461,9 +458,8 @@ putFileContentsIntoElement(DcmElement *elem, const char *filename) /* read binary file into the buffer */ if (fread(buf, 1, len, f) != len) { - char errBuf[256]; OFLOG_ERROR(dump2dcmLogger, "error reading binary data file: " << filename - << ": " << OFStandard::strerror(errno, errBuf, sizeof(errBuf))); + << ": " << OFStandard::getLastSystemErrorCode().message()); ec = EC_CorruptedData; } else if (evr == EVR_OW) @@ -532,7 +528,7 @@ insertIntoSet(DcmStack &stack, const E_TransferSyntax xfer, const DcmTagKey &tag else if (newTagVR == EVR_pixelItem) newElement = new DcmPixelItem(DCM_PixelItemTag); else - newElementError = DcmItem::newDicomElement(newElement, tag); + newElementError = DcmItem::newDicomElementWithVR(newElement, tag); if (newElementError == EC_Normal) { @@ -791,10 +787,6 @@ readDumpFile(DcmMetaInfo *metaheader, DcmDataset *dataset, int main(int argc, char *argv[]) { -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION , "Convert ASCII dump to DICOM file", rcsid); OFCommandLine cmd; diff --git a/dcmdata/apps/pdf2dcm.cc b/dcmdata/apps/pdf2dcm.cc index 9132008e..4b72e2cc 100644 --- a/dcmdata/apps/pdf2dcm.cc +++ b/dcmdata/apps/pdf2dcm.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2005-2014, OFFIS e.V. + * Copyright (C) 2005-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,10 +27,6 @@ #define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" -#ifdef HAVE_GUSI_H -#include -#endif - BEGIN_EXTERN_C #ifdef HAVE_FCNTL_H #include /* for O_RDONLY */ @@ -311,12 +307,6 @@ static void createIdentifiers( int main(int argc, char *argv[]) { - -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - const char *opt_ifname = NULL; const char *opt_ofname = NULL; diff --git a/dcmdata/apps/xml2dcm.cc b/dcmdata/apps/xml2dcm.cc index 6da18d9e..39b01cac 100644 --- a/dcmdata/apps/xml2dcm.cc +++ b/dcmdata/apps/xml2dcm.cc @@ -198,7 +198,7 @@ static OFCondition createNewElement(xmlNodePtr current, if (dcmEVR != EVR_UNKNOWN) dcmTag.setVR(dcmVR); /* create DICOM element */ - result = DcmItem::newDicomElement(newElem, dcmTag); + result = DcmItem::newDicomElementWithVR(newElem, dcmTag); } else { OFLOG_WARN(xml2dcmLogger, "invalid 'tag' attribute (" << elemTag << "), ignoring node"); result = EC_InvalidTag; @@ -278,10 +278,7 @@ static OFCondition putElementContent(xmlNodePtr current, /* read binary file into the buffer */ if (fread(buf, 1, OFstatic_cast(size_t, fileSize), f) != fileSize) { - char errBuf[256]; - const char *text = OFStandard::strerror(errno, errBuf, sizeof(errBuf)); - if (text == NULL) text = "(unknown error code)"; - OFLOG_ERROR(xml2dcmLogger, "error reading binary data file: " << filename << ": " << text); + OFLOG_ERROR(xml2dcmLogger, "error reading binary data file: " << filename << ": " << OFStandard::getLastSystemErrorCode().message()); result = EC_CorruptedData; } else if (dcmEVR == EVR_OW) diff --git a/dcmdata/data/CMakeLists.txt b/dcmdata/data/CMakeLists.txt index 976506b7..0879cda7 100644 --- a/dcmdata/data/CMakeLists.txt +++ b/dcmdata/data/CMakeLists.txt @@ -1,2 +1,9 @@ # declare installation files -INSTALL(FILES dicom.dic acrnema.dic private.dic diconde.dic dcm2xml.dtd dumppat.txt SC.dump VLP.dump DESTINATION ${DCMTK_INSTALL_DATDIR} COMPONENT data) +INSTALL(FILES dicom.dic acrnema.dic private.dic diconde.dic dcm2xml.dtd dumppat.txt SC.dump VLP.dump DESTINATION "${DCMTK_INSTALL_DATDIR}" COMPONENT data) + +# add paths to the dictionaries to a CMake variable for being used by the unit tests +SET(DCMTK_DICOM_DICTIONARIES + "${CMAKE_CURRENT_SOURCE_DIR}/dicom.dic" + "${CMAKE_CURRENT_SOURCE_DIR}/private.dic" + CACHE INTERNAL "paths to the DICOM data dictionaries" +) diff --git a/dcmdata/data/dicom.dic b/dcmdata/data/dicom.dic index cbe39e2d..3d9e89c2 100644 --- a/dcmdata/data/dicom.dic +++ b/dcmdata/data/dicom.dic @@ -21,13 +21,12 @@ # DICONDE (Digital Imaging and Communication in Nondestructive Evaluation) and # DICOS (Digital Imaging and Communications in Security) standard. # -# Generated automatically from DICOM PS 3.6-2016e and PS 3.7-2016e -# File created on 2016-11-23 13:16:19 by J. Riesmeier on thinkpad. -# File updated manually on 2017-01-31 by J. Riesmeier. +# Generated automatically from DICOM PS 3.6-2017b and PS 3.7-2017b +# File created on 2017-06-15 10:31:09 by J. Riesmeier on thinkpad. # # In addition, the data dictionary entries from the following final text # supplements and correction items (CP) have been incorporated: -# - CP 1619 +# - (none) # # Each line represents an entry in the data dictionary. Each line has 5 fields # (Tag, VR, Name, VM, Version). Entries need not be in ascending tag order. @@ -44,7 +43,7 @@ # # Comments have a '#' at the beginning of the line. # -# Tag VR Name VM Version +# Tag VR Name VM Version # (0000,0000) UL CommandGroupLength 1 DICOM (0000,0002) UI AffectedSOPClassUID 1 DICOM @@ -304,7 +303,10 @@ (0010,0217) LO StrainSource 1 DICOM (0010,0218) UT StrainAdditionalInformation 1 DICOM (0010,0219) SQ StrainCodeSequence 1 DICOM -(0010,1000) LO OtherPatientIDs 1-n DICOM +(0010,0221) SQ GeneticModificationsSequence 1 DICOM +(0010,0222) UC GeneticModificationsDescription 1 DICOM +(0010,0223) LO GeneticModificationsNomenclature 1 DICOM +(0010,0229) SQ GeneticModificationsCodeSequence 1 DICOM (0010,1001) PN OtherPatientNames 1-n DICOM (0010,1002) SQ OtherPatientIDsSequence 1 DICOM (0010,1005) PN PatientBirthName 1 DICOM @@ -319,7 +321,6 @@ (0010,1060) PN PatientMotherBirthName 1 DICOM (0010,1080) LO MilitaryRank 1 DICOM (0010,1081) LO BranchOfService 1 DICOM -(0010,1090) LO MedicalRecordLocator 1 DICOM (0010,1100) SQ ReferencedPatientPhotoSequence 1 DICOM (0010,2000) LO MedicalAlerts 1-n DICOM (0010,2110) LO Allergies 1-n DICOM @@ -1566,6 +1567,25 @@ (0022,1529) FL YCoordinatesCenterPixelViewAngle 1 DICOM (0022,1530) UL NumberOfMapPoints 1 DICOM (0022,1531) OF TwoDimensionalToThreeDimensionalMapData 1 DICOM +(0022,1612) SQ DerivationAlgorithmSequence 1 DICOM +(0022,1615) SQ OphthalmicImageTypeCodeSequence 1 DICOM +(0022,1616) LO OphthalmicImageTypeDescription 1 DICOM +(0022,1618) SQ ScanPatternTypeCodeSequence 1 DICOM +(0022,1620) SQ ReferencedSurfaceMeshIdentificationSequence 1 DICOM +(0022,1622) CS OphthalmicVolumetricPropertiesFlag 1 DICOM +(0022,1624) FL OphthalmicAnatomicReferencePointXCoordinate 1 DICOM +(0022,1626) FL OphthalmicAnatomicReferencePointYCoordinate 1 DICOM +(0022,1628) SQ OphthalmicEnFaceImageQualityRatingSequence 1 DICOM +(0022,1630) DS QualityThreshold 1 DICOM +(0022,1640) SQ OCTBscanAnalysisAcquisitionParametersSequence 1 DICOM +(0022,1642) UL NumberofBscansPerFrame 1 DICOM +(0022,1643) FL BscanSlabThickness 1 DICOM +(0022,1644) FL DistanceBetweenBscanSlabs 1 DICOM +(0022,1645) FL BscanCycleTime 1 DICOM +(0022,1646) FL BscanCycleTimeVector 1-n DICOM +(0022,1649) FL AscanRate 1 DICOM +(0022,1650) FL BscanRate 1 DICOM +(0022,1658) UL SurfaceMeshZPixelOffset 1 DICOM (0024,0010) FL VisualFieldHorizontalExtent 1 DICOM (0024,0011) FL VisualFieldVerticalExtent 1 DICOM (0024,0012) CS VisualFieldShape 1 DICOM @@ -2058,6 +2078,7 @@ (0040,4073) UR StorageURL 1 DICOM (0040,4074) SQ XDSStorageSequence 1 DICOM (0040,8302) DS EntranceDoseInmGy 1 DICOM +(0040,8303) CS EntranceDoseDerivation 1 DICOM (0040,9092) SQ ParametricMapFrameTypeSequence 1 DICOM (0040,9094) SQ ReferencedImageRealWorldValueMappingSequence 1 DICOM (0040,9096) SQ RealWorldValueMappingSequence 1 DICOM @@ -2507,7 +2528,7 @@ (0068,62D0) US HPGLDocumentID 1 DICOM (0068,62D5) LO HPGLDocumentLabel 1 DICOM (0068,62E0) SQ ViewOrientationCodeSequence 1 DICOM -(0068,62F0) FD ViewOrientationModifier 9 DICOM +(0068,62F0) SQ ViewOrientationModifierCodeSequence 1 DICOM (0068,62F2) FD HPGLDocumentScaling 1 DICOM (0068,6300) OB HPGLDocument 1 DICOM (0068,6310) US HPGLContourPenNumber 1 DICOM @@ -2672,9 +2693,13 @@ (0070,1203) US InputSequencePositionIndex 1 DICOM (0070,1204) CS Crop 1 DICOM (0070,1205) US CroppingSpecificationIndex 1-n DICOM -(0070,1206) CS CompositingMethod 1 DICOM (0070,1207) US VolumetricPresentationInputNumber 1 DICOM (0070,1208) CS ImageVolumeGeometry 1 DICOM +(0070,1209) UI VolumetricPresentationInputSetUID 1 DICOM +(0070,120A) SQ VolumetricPresentationInputSetSequence 1 DICOM +(0070,120B) CS GlobalCrop 1 DICOM +(0070,120C) US GlobalCroppingSpecificationIndex 1-n DICOM +(0070,120D) CS RenderingMethod 1 DICOM (0070,1301) SQ VolumeCroppingSequence 1 DICOM (0070,1302) CS VolumeCroppingMethod 1 DICOM (0070,1303) FD BoundingBoxCrop 6 DICOM @@ -2692,6 +2717,18 @@ (0070,150D) OD VolumetricCurvePoints 1 DICOM (0070,1511) FD MPRViewHeightDirection 3 DICOM (0070,1512) FD MPRViewHeight 1 DICOM +(0070,1602) CS RenderProjection 1 DICOM +(0070,1603) FD ViewpointPosition 3 DICOM +(0070,1604) FD ViewpointLookAtPoint 3 DICOM +(0070,1605) FD ViewpointUpDirection 3 DICOM +(0070,1606) FD RenderFieldOfView 6 DICOM +(0070,1607) FD SamplingStepSize 1 DICOM +(0070,1701) CS ShadingStyle 1 DICOM +(0070,1702) FD AmbientReflectionIntensity 1 DICOM +(0070,1703) FD LightDirection 3 DICOM +(0070,1704) FD DiffuseReflectionIntensity 1 DICOM +(0070,1705) FD SpecularReflectionIntensity 1 DICOM +(0070,1706) FD Shininess 1 DICOM (0070,1801) SQ PresentationStateClassificationComponentSequence 1 DICOM (0070,1802) CS ComponentType 1 DICOM (0070,1803) SQ ComponentInputSequence 1 DICOM @@ -2709,6 +2746,21 @@ (0070,1A03) FD RecommendedAnimationRate 1 DICOM (0070,1A04) SQ AnimationCurveSequence 1 DICOM (0070,1A05) FD AnimationStepSize 1 DICOM +(0070,1A06) FD SwivelRange 1 DICOM +(0070,1A07) OD VolumetricCurveUpDirections 1 DICOM +(0070,1A08) SQ VolumeStreamSequence 1 DICOM +(0070,1A09) LO RGBATransferFunctionDescription 1 DICOM +(0070,1B01) SQ AdvancedBlendingSequence 1 DICOM +(0070,1B02) US BlendingInputNumber 1 DICOM +(0070,1B03) SQ BlendingDisplayInputSequence 1 DICOM +(0070,1B04) SQ BlendingDisplaySequence 1 DICOM +(0070,1B06) CS BlendingMode 1 DICOM +(0070,1B07) CS TimeSeriesBlending 1 DICOM +(0070,1B08) CS GeometryForDisplay 1 DICOM +(0070,1B11) SQ ThresholdSequence 1 DICOM +(0070,1B12) SQ ThresholdValueSequence 1 DICOM +(0070,1B13) CS ThresholdType 1 DICOM +(0070,1B14) FD ThresholdValue 1 DICOM (0072,0002) SH HangingProtocolName 1 DICOM (0072,0004) LO HangingProtocolDescription 1 DICOM (0072,0006) CS HangingProtocolLevel 1 DICOM @@ -2909,7 +2961,7 @@ (0076,0020) SQ ProcedureTypeCodeSequence 1 DICOM (0076,0030) LO SurgicalTechnique 1 DICOM (0076,0032) SQ ComponentTypesSequence 1 DICOM -(0076,0034) CS ComponentTypeCodeSequence 1 DICOM +(0076,0034) SQ ComponentTypeCodeSequence 1 DICOM (0076,0036) CS ExclusiveComponentType 1 DICOM (0076,0038) CS MandatoryComponentType 1 DICOM (0076,0040) SQ ComponentSequence 1 DICOM @@ -3334,6 +3386,7 @@ (300A,007B) LT FractionPattern 1 DICOM (300A,0080) IS NumberOfBeams 1 DICOM (300A,0082) DS BeamDoseSpecificationPoint 3 DICOM +(300A,0083) UI ReferencedDoseReferenceUID 1 DICOM (300A,0084) DS BeamDose 1 DICOM (300A,0086) DS BeamMeterset 1 DICOM (300A,008B) CS BeamDoseMeaning 1 DICOM @@ -3887,7 +3940,9 @@ (0008,225A) SQ RETIRED_AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial 1 DICOM/retired (0008,225C) SQ RETIRED_OnAxisBackgroundAnatomicStructureCodeSequenceTrial 1 DICOM/retired (0008,4000) LT RETIRED_IdentifyingComments 1 DICOM/retired +(0010,1000) LO RETIRED_OtherPatientIDs 1-n DICOM/retired (0010,1050) LO RETIRED_InsurancePlanIdentification 1-n DICOM/retired +(0010,1090) LO RETIRED_MedicalRecordLocator 1 DICOM/retired (0014,0023) ST RETIRED_CADFileFormat 1 DICOM/retired (0014,0024) ST RETIRED_ComponentReferenceSystem 1 DICOM/retired (0014,0045) ST RETIRED_MaterialPropertiesFileFormatRetired 1 DICOM/retired @@ -4146,6 +4201,7 @@ (0070,0050) US RETIRED_DisplayedAreaTopLeftHandCornerTrial 2 DICOM/retired (0070,0051) US RETIRED_DisplayedAreaBottomRightHandCornerTrial 2 DICOM/retired (0070,0067) US RETIRED_GraphicLayerRecommendedDisplayRGBValue 3 DICOM/retired +(0070,1206) CS RETIRED_CompositingMethod 1 DICOM/retired (0074,1024) IS RETIRED_BeamOrderIndexTrial 1 DICOM/retired (0074,1038) DS RETIRED_DoubleExposureMetersetTrial 1 DICOM/retired (0074,103A) DS RETIRED_DoubleExposureFieldDeltaTrial 4 DICOM/retired @@ -4296,15 +4352,6 @@ # #--------------------------------------------------------------------------- # -# Correction Item 1619 -# -(0010,0221) SQ GeneticModificationsSequence 1 DICOM/CP_1619 -(0010,0222) UC GeneticModificationsDescription 1 DICOM/CP_1619 -(0010,0223) LO GeneticModificationsNomenclature 1 DICOM/CP_1619 -(0010,0229) SQ GeneticModificationsCodeSequence 1 DICOM/CP_1619 -# -#--------------------------------------------------------------------------- -# # Private Creator Data Elements # (0009-o-FFFF,0000) UL PrivateGroupLength 1 PRIVATE diff --git a/dcmdata/docs/CMakeLists.txt b/dcmdata/docs/CMakeLists.txt index 4c37c72e..b01d7557 100644 --- a/dcmdata/docs/CMakeLists.txt +++ b/dcmdata/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES datadict.txt DESTINATION ${DCMTK_INSTALL_DOCDIR} COMPONENT doc) +INSTALL(FILES datadict.txt DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc) diff --git a/dcmdata/docs/dcm2json.man b/dcmdata/docs/dcm2json.man index 44794451..f432b05e 100644 --- a/dcmdata/docs/dcm2json.man +++ b/dcmdata/docs/dcm2json.man @@ -6,13 +6,13 @@ \page dcm2json dcm2json: Convert DICOM file and data set to JSON \endif -\section synopsis SYNOPSIS +\section dcm2json_synopsis SYNOPSIS \verbatim dcm2json [options] dcmfile-in [jsonfile-out] \endverbatim -\section description DESCRIPTION +\section dcm2json_description DESCRIPTION The \b dcm2json utility converts the contents of a DICOM file (file format or raw data set) to JSON (JavaScript Object Notation). The output refers to the @@ -26,7 +26,7 @@ whenever possible (using the \b dcmconv utility). It is also possible to use the \e -f and -t[ieb] options to force \b dcm2json to read a data set with a particular transfer syntax. -\section parameters PARAMETERS +\section dcm2json_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be converted @@ -34,11 +34,10 @@ dcmfile-in DICOM input filename to be converted jsonfile-out JSON output filename (default: stdout) \endverbatim -\section options OPTIONS +\section dcm2json_options OPTIONS -\subsection general_options general options +\subsection dcm2json_general_options general options \verbatim - -h --help print this help text and exit @@ -65,7 +64,7 @@ jsonfile-out JSON output filename (default: stdout) use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcm2json_input_options input options \verbatim input file format: @@ -96,21 +95,25 @@ input transfer syntax: read with implicit VR little endian TS \endverbatim -\subsection output_options output options +\subsection dcm2json_output_options output options \verbatim output format: +fc --formatted-code - output file with human readable formatting (default) + enable whitespace formatting (default) + + # prints additional spaces and newlines for increased + # readability -fc --compact-code - output without formatting (single line of code) + print only required characters +m --write-meta write data set with meta information + (warning: not conforming to the DICOM standard) \endverbatim -\section json_format JSON Format +\section dcm2json_json_format JSON Format The basic structure of the JSON output created from a DICOM file looks like the following (see DICOM Part 18 Section F for details): @@ -120,7 +123,7 @@ the following (see DICOM Part 18 Section F for details): "00080005": { "vr": "CS", "Value": [ - "ISO_IR192" + "ISO_IR 192" ] }, "00080020": { @@ -271,7 +274,7 @@ the following (see DICOM Part 18 Section F for details): } \endverbatim -\subsection bulk_data Bulk Data +\subsection dcm2json_bulk_data Bulk Data Binary data, i.e. DICOM element values with Value Representations (VR) of OB or OW, as well as OD, OF and UN values are by default not written to the JSON @@ -280,26 +283,15 @@ Unique Identifier (UUID) is being generated and written as an value of a BulkDataURI JSON element. So far, there is no possibility to write an additional file to hold the binary data for each of the binary data chunks. -\section notes NOTES - -\subsection character_encoding Character Encoding +\section dcm2json_notes NOTES -The JSON encoding is determined automatically from the DICOM attribute -(0008,0005) "Specific Character Set" using the following mapping: +\subsection dcm2json_character_encoding Character Encoding -\verbatim -ISO Latin 1 "ISO_IR 100" => "UTF-8" -ISO Latin 2 "ISO_IR 101" => "UTF-8" -ISO Latin 3 "ISO_IR 109" => "UTF-8" -ISO Latin 4 "ISO_IR 110" => "UTF-8" -ISO Latin 5 "ISO_IR 148" => "UTF-8" -Cyrillic "ISO_IR 144" => "UTF-8" -Arabic "ISO_IR 127" => "UTF-8" -Greek "ISO_IR 126" => "UTF-8" -Hebrew "ISO_IR 138" => "UTF-8" -\endverbatim +\b dcm2json always tries to output in UTF-8 encoding. If this is not possible, +e.g. because there is no support for character set conversion, ASCII is used +instead (which is a subset of UTF-8). -\section logging LOGGING +\section dcm2json_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -318,7 +310,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcm2json_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -340,7 +332,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcm2json_environment ENVIRONMENT The \b dcm2json utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -356,7 +348,7 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section copyright COPYRIGHT +\section dcm2json_copyright COPYRIGHT Copyright (C) 2016-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmdata/docs/dcm2pdf.man b/dcmdata/docs/dcm2pdf.man index b0400a6b..d508af6b 100644 --- a/dcmdata/docs/dcm2pdf.man +++ b/dcmdata/docs/dcm2pdf.man @@ -6,20 +6,20 @@ \page dcm2pdf dcm2pdf: Extract PDF file from DICOM encapsulated PDF \endif -\section synopsis SYNOPSIS +\section dcm2pdf_synopsis SYNOPSIS \verbatim dcm2pdf [options] dcmfile-in pdffile-out \endverbatim -\section description DESCRIPTION +\section dcm2pdf_description DESCRIPTION The \b dcm2pdf utility reads a DICOM file of the Encapsulated PDF Storage SOP Class (\e dcmfile-in), extracts the embedded PDF document and writes it to an output file (\e pdffile-out). Optionally a command can be executed after the creation of the PDF file. -\section parameters PARAMETERS +\section dcm2pdf_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename @@ -27,9 +27,9 @@ dcmfile-in DICOM input filename pdffile-out PDF output filename \endverbatim -\section options OPTIONS +\section dcm2pdf_options OPTIONS -\subsection general_options general options +\subsection dcm2pdf_general_options general options \verbatim -h --help print this help text and exit @@ -57,7 +57,7 @@ pdffile-out PDF output filename use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcm2pdf_input_options input options \verbatim input file format: @@ -128,13 +128,13 @@ bitstream format of deflated input: expect deflated zlib bitstream \endverbatim -\subsection execution_options execution options +\subsection dcm2pdf_execution_options execution options \verbatim -x --exec [c]ommand: string execute command c after PDF extraction \endverbatim -\section notes NOTES +\section dcm2pdf_notes NOTES Option \e --exec allows for the execution of a certain command line after the creation of the PDF document. The command line to be executed is passed to @@ -143,7 +143,7 @@ placeholder '\#f', which will be replaced by the PDF filename at run time. The specified command line is executed in the foreground, i.e. \b pdf2dcm will be blocked until the command terminates. -\section logging LOGGING +\section dcm2pdf_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -162,7 +162,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcm2pdf_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -184,7 +184,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcm2pdf_environment ENVIRONMENT The \b dcm2pdf utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -200,11 +200,11 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section see_also SEE ALSO +\section dcm2pdf_see_also SEE ALSO pdf2dcm(1) -\section copyright COPYRIGHT +\section dcm2pdf_copyright COPYRIGHT Copyright (C) 2007-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmdata/docs/dcm2xml.man b/dcmdata/docs/dcm2xml.man index b5b11290..6910e833 100644 --- a/dcmdata/docs/dcm2xml.man +++ b/dcmdata/docs/dcm2xml.man @@ -6,13 +6,13 @@ \page dcm2xml dcm2xml: Convert DICOM file and data set to XML \endif -\section synopsis SYNOPSIS +\section dcm2xml_synopsis SYNOPSIS \verbatim dcm2xml [options] dcmfile-in [xmlfile-out] \endverbatim -\section description DESCRIPTION +\section dcm2xml_description DESCRIPTION The \b dcm2xml utility converts the contents of a DICOM file (file format or raw data set) to XML (Extensible Markup Language). There are two output @@ -29,7 +29,7 @@ whenever possible (using the \b dcmconv utility). It is also possible to use the \e -f and -t[ieb] options to force \b dcm2xml to read a data set with a particular transfer syntax. -\section parameters PARAMETERS +\section dcm2xml_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be converted @@ -37,9 +37,9 @@ dcmfile-in DICOM input filename to be converted xmlfile-out XML output filename (default: stdout) \endverbatim -\section options OPTIONS +\section dcm2xml_options OPTIONS -\subsection general_options general options +\subsection dcm2xml_general_options general options \verbatim -h --help print this help text and exit @@ -67,7 +67,7 @@ xmlfile-out XML output filename (default: stdout) use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcm2xml_input_options input options \verbatim input file format: @@ -109,7 +109,7 @@ long tag values: set threshold for long values to k kbytes \endverbatim -\subsection processing_options processing options +\subsection dcm2xml_processing_options processing options \verbatim specific character set: @@ -134,7 +134,7 @@ specific character set: # (see output of --version on which one is available) \endverbatim -\subsection output_options output options +\subsection dcm2xml_output_options output options \verbatim general XML format: @@ -183,7 +183,7 @@ encoding of binary data: encode binary data as Base64 (RFC 2045, MIME) \endverbatim -\section dcmtk_format DCMTK Format +\section dcm2xml_dcmtk_format DCMTK Format The basic structure of the DCMTK-specific XML output created from a DICOM file looks like the following: @@ -229,7 +229,7 @@ looks like the following: The "file-format" and "meta-header" tags are absent for DICOM data sets. -\subsection xml_encoding XML Encoding +\subsection dcm2xml_xml_encoding XML Encoding Attributes with very large value fields (e.g. pixel data) are not loaded by default. They can be identified by the additional attribute "loaded" with a @@ -253,12 +253,12 @@ length e.g. because of non-significant padding that has been removed. If this attribute is missing in "sequence" or "item" start tags, the corresponding DICOM element has been stored with undefined length. -\section native_format Native DICOM Model Format +\section dcm2xml_native_format Native DICOM Model Format The description of the Native DICOM Model format can be found in the DICOM standard, part 19 ("Application Hosting"). -\subsection bulk_data Bulk Data +\subsection dcm2xml_bulk_data Bulk Data Binary data, i.e. DICOM element values with Value Representations (VR) of OB or OW, as well as OD, OF and UN values are by default not written to the XML @@ -276,7 +276,7 @@ for encoding binary data as Base64. Currently, the command line option \e --encode-base64 enables this encoding for the following VRs: OB, OD, OF, OW, and UN. -\subsection known_issues Known Issues +\subsection dcm2xml_known_issues Known Issues In addition to what is written in the above section on "Bulk Data", there are further known issues with the current implementation of the Native DICOM Model @@ -285,9 +285,9 @@ or UN are currently never written as bulk data, although it might be useful, e.g. for very long text elements (especially UT) or very long numeric fields (of various VRs). -\section notes NOTES +\section dcm2xml_notes NOTES -\subsection character_encoding Character Encoding +\subsection dcm2xml_character_encoding Character Encoding The XML encoding is determined automatically from the DICOM attribute (0008,0005) "Specific Character Set" using the following mapping: @@ -319,7 +319,7 @@ data set to UTF-8 encoding prior to the conversion to XML format. This is also useful for DICOMDIR files where each directory record can have a different character set. -\section logging LOGGING +\section dcm2xml_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -338,7 +338,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcm2xml_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -360,7 +360,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcm2xml_environment ENVIRONMENT The \b dcm2xml utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -376,15 +376,15 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section files FILES +\section dcm2xml_files FILES \/dcm2xml.dtd - Document Type Definition (DTD) file -\section see_also SEE ALSO +\section dcm2xml_see_also SEE ALSO xml2dcm(1), dcmconv(1) -\section copyright COPYRIGHT +\section dcm2xml_copyright COPYRIGHT Copyright (C) 2002-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmdata/docs/dcmconv.man b/dcmdata/docs/dcmconv.man index f142f030..3c947313 100644 --- a/dcmdata/docs/dcmconv.man +++ b/dcmdata/docs/dcmconv.man @@ -6,18 +6,18 @@ \page dcmconv dcmconv: Convert DICOM file encoding \endif -\section synopsis SYNOPSIS +\section dcmconv_synopsis SYNOPSIS \verbatim dcmconv [options] dcmfile-in dcmfile-out \endverbatim -\section description DESCRIPTION +\section dcmconv_description DESCRIPTION The \b dcmconv utility reads a DICOM file (\e dcmfile-in), performs an encoding conversion and writes the converted data to an output file (\e dcmfile-out). -\section parameters PARAMETERS +\section dcmconv_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be converted @@ -25,9 +25,9 @@ dcmfile-in DICOM input filename to be converted dcmfile-out DICOM output filename to write to \endverbatim -\section options OPTIONS +\section dcmconv_options OPTIONS -\subsection general_options general options +\subsection dcmconv_general_options general options \verbatim -h --help print this help text and exit @@ -55,7 +55,7 @@ dcmfile-out DICOM output filename to write to use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmconv_input_options input options \verbatim input file format: @@ -203,7 +203,7 @@ bitstream format of deflated input: expect deflated zlib bitstream \endverbatim -\subsection processing_options processing options +\subsection dcmconv_processing_options processing options \verbatim specific character set: @@ -238,7 +238,7 @@ other processing options: remove elements with invalid group number \endverbatim -\subsection output_options output options +\subsection dcmconv_output_options output options \verbatim output file format: @@ -268,6 +268,10 @@ output transfer syntax: +td --write-xfer-deflated write with deflated explicit VR little endian TS + +tg --write-xfer-ge + write private GE implicit VR little endian + with big endian pixel data TS (non-standard) + post-1993 value representations: +u --enable-new-vr @@ -320,7 +324,7 @@ deflate compression level (only with --write-xfer-deflated): 0=uncompressed, 1=fastest, 9=best compression \endverbatim -\section logging LOGGING +\section dcmconv_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -339,7 +343,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmconv_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -361,7 +365,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmconv_environment ENVIRONMENT The \b dcmconv utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -377,11 +381,11 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section see_also SEE ALSO +\section dcmconv_see_also SEE ALSO dcmdump(1) -\section copyright COPYRIGHT +\section dcmconv_copyright COPYRIGHT Copyright (C) 1994-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmdata/docs/dcmcrle.man b/dcmdata/docs/dcmcrle.man index 09b749c6..75012802 100644 --- a/dcmdata/docs/dcmcrle.man +++ b/dcmdata/docs/dcmcrle.man @@ -6,19 +6,19 @@ \page dcmcrle dcmcrle: Encode DICOM file to RLE transfer syntax \endif -\section synopsis SYNOPSIS +\section dcmcrle_synopsis SYNOPSIS \verbatim dcmcrle [options] dcmfile-in dcmfile-out \endverbatim -\section description DESCRIPTION +\section dcmcrle_description DESCRIPTION The \b dcmcrle utility reads an uncompressed DICOM image (\e dcmfile-in), performs RLE compression (i.e. conversion to an encapsulated DICOM transfer syntax) and writes the converted image to an output file (\e dcmfile-out). -\section parameters PARAMETERS +\section dcmcrle_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be converted @@ -26,9 +26,9 @@ dcmfile-in DICOM input filename to be converted dcmfile-out DICOM output filename \endverbatim -\section options OPTIONS +\section dcmcrle_options OPTIONS -\subsection general_options general options +\subsection dcmcrle_general_options general options \verbatim -h --help print this help text and exit @@ -56,7 +56,7 @@ dcmfile-out DICOM output filename use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmcrle_input_options input options \verbatim input file format: @@ -87,7 +87,7 @@ input transfer syntax: read with implicit VR little endian TS \endverbatim -\subsection enc_pix_data_encoding_opt encapsulated pixel data encoding options +\subsection dcmcrle_enc_pix_data_encoding_opt encapsulated pixel data encoding options \verbatim pixel data fragmentation: @@ -121,7 +121,7 @@ SOP Instance UID: always assign new UID \endverbatim -\subsection output_options output options +\subsection dcmcrle_output_options output options \verbatim post-1993 value representations: @@ -163,14 +163,14 @@ data set trailing padding: and items on multiple of i bytes \endverbatim -\section notes NOTES +\section dcmcrle_notes NOTES Please note that the DICOM standard does not allow for storing the pixel data with multiple fragments per frame (when RLE compression is used). So limiting the fragment size with option \e --fragment-size (or \e +fs) may result in a non-standard conformant DICOM image. -\section transfer_syntaxes TRANSFER SYNTAXES +\section dcmcrle_transfer_syntaxes TRANSFER SYNTAXES \b dcmcrle supports the following transfer syntaxes for input (\e dcmfile-in): @@ -191,7 +191,7 @@ BigEndianExplicitTransferSyntax 1.2.840.10008.1.2.2 RLELosslessTransferSyntax 1.2.840.10008.1.2.5 \endverbatim -\section logging LOGGING +\section dcmcrle_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -210,7 +210,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmcrle_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -232,7 +232,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmcrle_environment ENVIRONMENT The \b dcmcrle utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -248,11 +248,11 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section see_also SEE ALSO +\section dcmcrle_see_also SEE ALSO dcmdrle(1) -\section copyright COPYRIGHT +\section dcmcrle_copyright COPYRIGHT Copyright (C) 2002-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmdata/docs/dcmdata.dox b/dcmdata/docs/dcmdata.dox index 54fd9ad6..99fa20ea 100644 --- a/dcmdata/docs/dcmdata.dox +++ b/dcmdata/docs/dcmdata.dox @@ -19,6 +19,7 @@ Here are some further classes that are of interest: \section Tools This module contains the following command line tools: +\li \ref dcm2json \li \ref dcm2pdf \li \ref dcm2xml \li \ref dcmconv @@ -32,7 +33,6 @@ This module contains the following command line tools: \li \ref img2dcm \li \ref pdf2dcm \li \ref xml2dcm -\li \ref dcm2json \section Files diff --git a/dcmdata/docs/dcmdrle.man b/dcmdata/docs/dcmdrle.man index e884f0bd..4dea8e34 100644 --- a/dcmdata/docs/dcmdrle.man +++ b/dcmdata/docs/dcmdrle.man @@ -6,19 +6,19 @@ \page dcmdrle dcmdrle: Decode RLE-compressed DICOM file \endif -\section synopsis SYNOPSIS +\section dcmdrle_synopsis SYNOPSIS \verbatim dcmdrle [options] dcmfile-in dcmfile-out \endverbatim -\section description DESCRIPTION +\section dcmdrle_description DESCRIPTION The \b dcmdrle utility reads a RLE-compressed DICOM image (\e dcmfile-in), decompresses the image data (i.e. conversion to a native DICOM transfer syntax) and writes the converted image to an output file (\e dcmfile-out). -\section parameters PARAMETERS +\section dcmdrle_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be converted @@ -26,9 +26,9 @@ dcmfile-in DICOM input filename to be converted dcmfile-out DICOM output filename \endverbatim -\section options OPTIONS +\section dcmdrle_options OPTIONS -\subsection general_options general options +\subsection dcmdrle_general_options general options \verbatim -h --help print this help text and exit @@ -56,7 +56,7 @@ dcmfile-out DICOM output filename use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmdrle_input_options input options \verbatim input file format: @@ -76,7 +76,7 @@ input file format: # but unfortunately it does. \endverbatim -\subsection processing_options processing options +\subsection dcmdrle_processing_options processing options \verbatim SOP Instance UID: @@ -99,7 +99,7 @@ RLE byte segment order: # images with more than one byte per sample. \endverbatim -\subsection output_options output options +\subsection dcmdrle_output_options output options \verbatim output file format: @@ -160,7 +160,7 @@ data set trailing padding (not with --write-dataset): and items on multiple of i bytes \endverbatim -\section transfer_syntaxes TRANSFER SYNTAXES +\section dcmdrle_transfer_syntaxes TRANSFER SYNTAXES \b dcmdrle supports the following transfer syntaxes for input (\e dcmfile-in): @@ -184,7 +184,7 @@ LittleEndianExplicitTransferSyntax 1.2.840.10008.1.2.1 BigEndianExplicitTransferSyntax 1.2.840.10008.1.2.2 \endverbatim -\section logging LOGGING +\section dcmdrle_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -203,7 +203,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmdrle_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -225,7 +225,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmdrle_environment ENVIRONMENT The \b dcmdrle utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -241,11 +241,11 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section see_also SEE ALSO +\section dcmdrle_see_also SEE ALSO dcmcrle(1) -\section copyright COPYRIGHT +\section dcmdrle_copyright COPYRIGHT Copyright (C) 2002-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany diff --git a/dcmdata/docs/dcmdump.man b/dcmdata/docs/dcmdump.man index 54175e9e..2fa40ada 100644 --- a/dcmdata/docs/dcmdump.man +++ b/dcmdata/docs/dcmdump.man @@ -6,13 +6,13 @@ \page dcmdump dcmdump: Dump DICOM file and data set \endif -\section synopsis SYNOPSIS +\section dcmdump_synopsis SYNOPSIS \verbatim dcmdump [options] dcmfile-in... \endverbatim -\section description DESCRIPTION +\section dcmdump_description DESCRIPTION The \b dcmdump utility dumps the contents of a DICOM file (file format or raw data set) to stdout in textual form. Attributes with very large value fields @@ -30,15 +30,15 @@ whenever possible (using the \b dcmconv utility). It is also possible to use the \e -f and -t[ieb] options to force \b dcmdump to read a dataset with a particular transfer syntax. -\section parameters PARAMETERS +\section dcmdump_parameters PARAMETERS \verbatim dcmfile-in DICOM input file or directory to be dumped \endverbatim -\section options OPTIONS +\section dcmdump_options OPTIONS -\subsection general_options general options +\subsection dcmdump_general_options general options \verbatim -h --help print this help text and exit @@ -66,7 +66,7 @@ dcmfile-in DICOM input file or directory to be dumped use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmdump_input_options input options \verbatim input file format: @@ -224,6 +224,12 @@ other parsing options: +st --stop-after-elem [t]ag: "gggg,eeee" or dictionary name stop parsing after element specified by t + +sb --stop-before-elem [t]ag: "gggg,eeee" or dictionary name + stop parsing before element specified by t + + # only considers elements on main dataset level and also + # works if the given tag is not present in the file + automatic data correction: +dc --enable-correction @@ -241,7 +247,7 @@ bitstream format of deflated input: expect deflated zlib bitstream \endverbatim -\subsection processing_options processing options +\subsection dcmdump_processing_options processing options \verbatim specific character set: @@ -253,7 +259,7 @@ specific character set: # (see output of --version on which one is available) \endverbatim -\subsection output_options output options +\subsection dcmdump_output_options output options \verbatim printing: @@ -343,7 +349,7 @@ writing: (little endian, filename created automatically) \endverbatim -\section notes NOTES +\section dcmdump_notes NOTES Adding directories as a parameter to the command line only makes sense if option \e --scan-directories is also given. If the files in the provided @@ -354,7 +360,7 @@ directories, and, if any other patterns are specified on the command line outside the \e --scan-pattern option (e.g. in order to select further files), these do not apply to the specified directories. -\section logging LOGGING +\section dcmdump_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -373,7 +379,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmdump_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -395,7 +401,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmdump_environment ENVIRONMENT The \b dcmdump utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -411,11 +417,11 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section see_also SEE ALSO +\section dcmdump_see_also SEE ALSO dump2dcm(1), dcmconv(1) -\section copyright COPYRIGHT +\section dcmdump_copyright COPYRIGHT Copyright (C) 1994-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmdata/docs/dcmftest.man b/dcmdata/docs/dcmftest.man index c5c3d82a..159ccaa7 100644 --- a/dcmdata/docs/dcmftest.man +++ b/dcmdata/docs/dcmftest.man @@ -6,24 +6,24 @@ \page dcmftest dcmftest: Test if file uses DICOM part 10 format \endif -\section synopsis SYNOPSIS +\section dcmftest_synopsis SYNOPSIS \verbatim dcmftest file... \endverbatim -\section description DESCRIPTION +\section dcmftest_description DESCRIPTION The \b dcmftest utility checks whether the files specified on the command line are DICOM files in part 10 format (with meta-header). -\section parameters PARAMETERS +\section dcmftest_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be dumped \endverbatim -\section notes NOTES +\section dcmftest_notes NOTES All files specified on the command line are checked for the presence of the DICOM "magic word" 'DICM' at byte position 128. No attempt is made to parse @@ -33,12 +33,12 @@ with a return code corresponding to the number of files found to be non-DICOM, i.e. if all files pass as DICOM files, the return value is 0. This behavior is intended for use in shell script programming. -\section see_also SEE ALSO +\section dcmftest_see_also SEE ALSO dcmgpdir(1), dcmmkdir(1) -\section copyright COPYRIGHT +\section dcmftest_copyright COPYRIGHT Copyright (C) 1997-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. -*/ \ No newline at end of file +*/ diff --git a/dcmdata/docs/dcmgpdir.man b/dcmdata/docs/dcmgpdir.man index ff287abb..34993f65 100644 --- a/dcmdata/docs/dcmgpdir.man +++ b/dcmdata/docs/dcmgpdir.man @@ -6,13 +6,13 @@ \page dcmgpdir dcmgpdir: Create a general purpose DICOMDIR \endif -\section synopsis SYNOPSIS +\section dcmgpdir_synopsis SYNOPSIS \verbatim dcmgpdir [options] [dcmfile-in...] \endverbatim -\section description DESCRIPTION +\section dcmgpdir_description DESCRIPTION The \b dcmgpdir utility creates a \e DICOMDIR file from the specified referenced DICOM files according to the DICOM Part 11 Media Storage @@ -27,15 +27,15 @@ Currently, the following profiles are supported: Media Storage Application Profiles than the general purpose one (e.g. the cardio profiles require the use of icon images). -\section parameters PARAMETERS +\section dcmgpdir_parameters PARAMETERS \verbatim dcmfile-in referenced DICOM file (or directory to be scanned) \endverbatim -\section options OPTIONS +\section dcmgpdir_options OPTIONS -\subsection general_options general options +\subsection dcmgpdir_general_options general options \verbatim -h --help print this help text and exit @@ -63,7 +63,7 @@ dcmfile-in referenced DICOM file (or directory to be scanned) use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmgpdir_input_options input options \verbatim DICOMDIR identifiers: @@ -104,7 +104,7 @@ reading: # possibly not available on all systems \endverbatim -\subsection processing_options processing options +\subsection dcmgpdir_processing_options processing options \verbatim consistency check: @@ -141,7 +141,7 @@ other checks: (just warn) \endverbatim -\subsection output_options output options +\subsection dcmgpdir_output_options output options \verbatim DICOMDIR file: @@ -196,7 +196,7 @@ length encoding in sequences and items: write with undefined lengths \endverbatim -\section notes NOTES +\section dcmgpdir_notes NOTES All files specified on the command line (or discovered by recursively examining the contents of directories with the \e +r option) are first evaluated for @@ -219,7 +219,7 @@ Please note that this update process might be slower than just appending new entries. However, it makes sure that additional information that is required for the selected application profile is also added to existing records. -\subsection scanning_directories Scanning Directories +\subsection dcmgpdir_scanning_directories Scanning Directories Adding files from directories is possible by using option \e --recurse. If no further command line parameters are given, the directory specified by option @@ -233,7 +233,7 @@ other patterns are specified on the command line outside the \e --input-directory option (e.g. in order to select further files), these do not apply to the specified directories. -\section logging LOGGING +\section dcmgpdir_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -252,7 +252,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmgpdir_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -274,7 +274,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmgpdir_environment ENVIRONMENT The \b dcmgpdir utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -290,11 +290,11 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section see_also SEE ALSO +\section dcmgpdir_see_also SEE ALSO dcmmkdir(1) -\section copyright COPYRIGHT +\section dcmgpdir_copyright COPYRIGHT Copyright (C) 1996-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmdata/docs/dcmodify.man b/dcmdata/docs/dcmodify.man index b2031805..f8764314 100644 --- a/dcmdata/docs/dcmodify.man +++ b/dcmdata/docs/dcmodify.man @@ -6,13 +6,13 @@ \page dcmodify dcmodify: Modify DICOM files \endif -\section synopsis SYNOPSIS +\section dcmodify_synopsis SYNOPSIS \verbatim dcmodify [options] dcmfile-in... \endverbatim -\section description DESCRIPTION +\section dcmodify_description DESCRIPTION \b dcmodify is a tool that allows one to modify, insert and delete tags and items in DICOM files. Sequences and tags with a value multiplicity > 1 are @@ -63,15 +63,15 @@ would exist, the rest (4) would be inserted. Please note that there are some issues concerning the modification of private tags (see PRIVATE TAGS section) and for changing UIDs (CHANGING UIDs section). -\section parameters PARAMETERS +\section dcmodify_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename(s) to be modified \endverbatim -\section options OPTIONS +\section dcmodify_options OPTIONS -\subsection general_options general options +\subsection dcmodify_general_options general options \verbatim -h --help print this help text and exit @@ -99,7 +99,7 @@ dcmfile-in DICOM input filename(s) to be modified use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmodify_input_options input options \verbatim input file format: @@ -157,7 +157,7 @@ bitstream format of deflated input: expect deflated zlib bitstream \endverbatim -\subsection processing_options processing options +\subsection dcmodify_processing_options processing options \verbatim backup input files: @@ -229,7 +229,7 @@ error handling: having a VR of UN \endverbatim -\subsection output_options output options +\subsection dcmodify_output_options output options \verbatim output file format: @@ -293,13 +293,13 @@ data set trailing padding (not with --write-dataset): multiple of i bytes \endverbatim -\section private_tags PRIVATE TAGS +\section dcmodify_private_tags PRIVATE TAGS There are some issues you have to consider when working with private tags. However, the insertion or modification of a reservation tag (gggg,00xx) should always work. -\subsection private_insertions Insertions +\subsection dcmodify_private_insertions Insertions If you wish to insert a private tag (not a reservation with gggg,00xx), be sure, that you've listed it in your dictionary (see @@ -319,7 +319,7 @@ the tag then cannot be found in the dictionary. See description above how inserting values into elements with unknown VR are handled. -\subsection private_modifications Modifications +\subsection dcmodify_private_modifications Modifications If you modify a private tags value, \b dcmodify won't check its VR against the dictionary. So please be careful to enter only values that match the tag's VR. @@ -332,7 +332,7 @@ it. Then \b dcmodify uses your dictionary entry to determine the right VR Also, see description above how inserting values into elements with unknown VR are handled. -\subsection private_deletions Deletions +\subsection dcmodify_private_deletions Deletions When you use \b dcmodify to delete a private reservation tag, please note that \b dcmodify won't touch the private tags that are under this reservation. The @@ -341,7 +341,7 @@ associated private tags. For the deletion of private non-reservation tags there are no special issues. -\section changing_uids CHANGING UIDS +\section dcmodify_changing_uids CHANGING UIDS \b dcmodify will automatically correct 'Media Storage SOP Class UID' and 'Media Storage SOP Instance UID' in the metaheader, if you make changes to the @@ -362,7 +362,7 @@ When choosing the \e -gin option, the related metaheader tag ('Media Storage SOP Instance UID') is updated automatically. This behavior cannot be disabled. -\section creating_new_files CREATING NEW FILES +\section dcmodify_creating_new_files CREATING NEW FILES Option \e --create-file lets \b dcmodify create a file if it does not already exist on disk. This can be used in order to create files from scratch by @@ -375,7 +375,7 @@ is not permitted together with \e --create. This way, at least the metaheader is written and no file with zero byte length is created in a case where no insertions are performed in the \b dcmodify call. -\section element_values_from_file ELEMENT VALUES FROM FILE +\section dcmodify_element_values_from_file ELEMENT VALUES FROM FILE In order to read the element value from a file instead of specifying it on the command line, option \e -mf and \e -if can be used. Please note that for OW @@ -383,7 +383,7 @@ elements, the data is expected to be little endian ordered and will be swapped if necessary. The file size should always be an even number of bytes, i.e. no automatic padding is performed. -\section wildcards WILDCARDS +\section dcmodify_wildcards WILDCARDS \b dcmodify also permits the usage of a wildcard character "*" for item numbers in path expressions, e.g. "ContentSequence[*].CodeValue" selects all "Code @@ -397,7 +397,7 @@ The options \e -ma and \e -ea for modifying or deleting all occurrences of a DICOM element based on its tag do not accept any wildcards but only work on single elements (i.e. a single dictionary name or tag key). -\section examples EXAMPLES +\section dcmodify_examples EXAMPLES \verbatim -i --insert: @@ -507,7 +507,7 @@ single elements (i.e. a single dictionary name or tag key). \endverbatim -\section error_handling ERROR HANDLING +\section dcmodify_error_handling ERROR HANDLING \b dcmodify tries executing each modify operation given on command line: If one returns an error, the others are being performed anyway. However in case @@ -522,7 +522,7 @@ treated as being successful. That does make sense if someone wants to be sure that specific tags are not present in the file or that - if they exist - that they are set to a specific value. -\section logging LOGGING +\section dcmodify_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -541,7 +541,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmodify_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -563,7 +563,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmodify_environment ENVIRONMENT The \b dcmodify utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -579,7 +579,7 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section copyright COPYRIGHT +\section dcmodify_copyright COPYRIGHT Copyright (C) 2003-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmdata/docs/dump2dcm.man b/dcmdata/docs/dump2dcm.man index 98f2e133..b1ad195e 100644 --- a/dcmdata/docs/dump2dcm.man +++ b/dcmdata/docs/dump2dcm.man @@ -6,20 +6,20 @@ \page dump2dcm dump2dcm: Convert ASCII dump to DICOM file \endif -\section synopsis SYNOPSIS +\section dump2dcm_synopsis SYNOPSIS \verbatim dump2dcm [options] dumpfile-in dcmfile-out \endverbatim -\section description DESCRIPTION +\section dump2dcm_description DESCRIPTION The \b dump2dcm utility converts an ASCII dump file to a DICOM file. The dump file has the same format as the output of \b dcmdump. Thus it is possible to capture the output of \b dcmdump into a file, modify some attributes and create a new DICOM file. -\section parameters PARAMETERS +\section dump2dcm_parameters PARAMETERS \verbatim dumpfile-in dump input filename @@ -27,9 +27,9 @@ dumpfile-in dump input filename dcmfile-out DICOM output filename \endverbatim -\section options OPTIONS +\section dump2dcm_options OPTIONS -\subsection general_options general options +\subsection dump2dcm_general_options general options \verbatim -h --help print this help text and exit @@ -57,7 +57,7 @@ dcmfile-out DICOM output filename use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dump2dcm_input_options input options \verbatim input file format: @@ -81,7 +81,7 @@ other input options: maximum line length m (default: 4096) \endverbatim -\subsection processing_options processing options +\subsection dump2dcm_processing_options processing options \verbatim unique identifiers: @@ -95,7 +95,7 @@ unique identifiers: overwrite existing UIDs \endverbatim -\subsection output_options output options +\subsection dump2dcm_output_options output options \verbatim output file format: @@ -178,9 +178,9 @@ deflate compression level (only with --write-xfer-deflated): 0=uncompressed, 1=fastest, 9=best compression \endverbatim -\section notes NOTES +\section dump2dcm_notes NOTES -\subsection notes_description Dump File Description +\subsection dump2dcm_notes_description Dump File Description The input file can be an output of \b dcmdump (default indented format only). One element (tag, VR, value) must be written into one line separated by @@ -231,7 +231,7 @@ Value: There are several rules for writing values: not detected. \endverbatim -\subsection notes_example Example +\subsection dump2dcm_notes_example Example \verbatim (0008,0020) DA [19921012] # 8, 1 StudyDate @@ -243,13 +243,13 @@ Value: There are several rules for writing values: (0002,0001) OB 01\\00 \endverbatim -\subsection limitations Limitations +\subsection dump2dcm_limitations Limitations Please note that \b dump2dcm currently does not fully support DICOMDIR files. Specifically, the value of the various offset data elements is not updated automatically by this tool. -\section logging LOGGING +\section dump2dcm_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -268,7 +268,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dump2dcm_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -290,7 +290,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dump2dcm_environment ENVIRONMENT The \b dump2dcm utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -306,11 +306,11 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section see_also SEE ALSO +\section dump2dcm_see_also SEE ALSO dcmdump(1) -\section copyright COPYRIGHT +\section dump2dcm_copyright COPYRIGHT Copyright (C) 1996-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmdata/docs/img2dcm.man b/dcmdata/docs/img2dcm.man index 53c6d07c..dbae2638 100644 --- a/dcmdata/docs/img2dcm.man +++ b/dcmdata/docs/img2dcm.man @@ -6,13 +6,13 @@ \page img2dcm img2dcm: Convert standard image formats into DICOM format \endif -\section synopsis SYNOPSIS +\section img2dcm_synopsis SYNOPSIS \verbatim img2dcm [options] imgfile-in dcmfile-out \endverbatim -\section description DESCRIPTION +\section img2dcm_description DESCRIPTION The \b img2dcm tool serves as a conversion tool from a standard image format like JPEG or BMP to DICOM. Different output SOP Classes can be selected. The @@ -22,15 +22,15 @@ for the resulting DICOM object. \b img2dcm can also be configured to invent missing DICOM type 1 and type 2 attributes to work even without any template dataset. -\section parameters PARAMETERS +\section img2dcm_parameters PARAMETERS \verbatim imgfile-in image file to be imported dcmfile-out DICOM output file \endverbatim -\section options OPTIONS -\subsection general_options general options +\section img2dcm_options OPTIONS +\subsection img2dcm_general_options general options \verbatim -h --help print this help text and exit @@ -58,7 +58,7 @@ dcmfile-out DICOM output file use config file f for the logger \endverbatim -\subsection input_options input options +\subsection img2dcm_input_options input options \verbatim general: @@ -92,7 +92,7 @@ JPEG format: keep APPn sections (except JFIF) \endverbatim -\subsection processing_options processing options +\subsection img2dcm_processing_options processing options \verbatim attribute checking: @@ -132,7 +132,7 @@ other processing options: add further attribute \endverbatim -\subsection output_options output options +\subsection img2dcm_output_options output options \verbatim target SOP class: @@ -182,9 +182,9 @@ data set trailing padding (not with --write-dataset): and items on multiple of i bytes \endverbatim -\section notes NOTES +\section img2dcm_notes NOTES -\subsection attribute_sources Attribute Sources +\subsection img2dcm_attribute_sources Attribute Sources For converting a general image format into DICOM format, the \b img2dcm application may be fed with some additional input for filling mandatory (and @@ -247,7 +247,7 @@ order: notation has to be used. Details on this path notation can be found in the documentation of \b dcmodify. -\subsection uids UIDs +\subsection img2dcm_uids UIDs New Study and Series Instance UIDs are generated if necessary after applying the \e --study-from and \e --series options. If Study Instance UID or @@ -260,7 +260,7 @@ be the desirable behavior for most use cases. However, if a certain SOP Instance UID should be inserted into the new object, the \e --key option should be used. -\subsection input_templates Input Templates +\subsection img2dcm_input_templates Input Templates For supporting the conversion into DICOM, \b img2dcm comes with some pre-defined templates which can be used for the \e --dataset-from option (see @@ -278,12 +278,12 @@ attributes are present which should be part of the constructed DICOM object. The SOP Class UID and the Pixel Data attributes (including attributes like Rows, Columns etc.) are not copied but replaced by \b img2dcm during conversion. -\subsection input_plugins Input Plugins +\subsection img2dcm_input_plugins Input Plugins The \b img2dcm application currently supports the JPEG and the BMP image format as input. -\subsubsection jpeg_input_plugin JPEG Input Plugin +\subsubsection img2dcm_jpeg_input_plugin JPEG Input Plugin For JPEG, the original JPEG from the source file is not decoded but extracted and slightly transformed (e. g. JFIF header is cut off) to allow fast @@ -333,7 +333,7 @@ does the trick. It should also be slightly faster than cutting off APPn information, because it is not necessary to scan the whole JPEG stream for such data. JFIF information is \b always removed by \b img2dcm. -\subsubsection bmp_input_plugin BMP Input Plugin +\subsubsection img2dcm_bmp_input_plugin BMP Input Plugin \b img2dcm supports BMP as input format. However, so far only the most common BMP images are supported. In particular, BMP images which use bit fields or @@ -341,7 +341,7 @@ run length encoding will be rejected. Such images are uncommon. All input images will be converted into a DICOM image with RGB color model and a bit depth of 24. There are no specific options for fine-tuning BMP format conversion. -\subsection output_plugins Output Plugins +\subsection img2dcm_output_plugins Output Plugins The desired output SOP Class can be selected on the command line. Currently, an export plugin for the Secondary Capture Image SOP class (default, option @@ -357,7 +357,7 @@ classes are differentiated from each other by color depth (1/8/16) and the fact whether the image is black/white or color. That is why \b img2dcm decides during conversion, which output SOP class is suitable for a given source image. -\section examples EXAMPLES +\section img2dcm_examples EXAMPLES Here are some examples that show how the \b img2dcm application can be used. @@ -421,7 +421,7 @@ object's resulting JPEG stream. Further, \e --insist-on-jfif will force -\section logging LOGGING +\section img2dcm_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -440,7 +440,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section img2dcm_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -462,7 +462,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section img2dcm_environment ENVIRONMENT The \b img2dcm utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -478,18 +478,18 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section files FILES +\section img2dcm_files FILES \/SC.dump - Sample dump file for Secondary Capture images \n\/VLP.dump - Sample dump file for Visible Light Photographic images -\section see_also SEE ALSO +\section img2dcm_see_also SEE ALSO dcm2pnm(1), dcmj2pnm(1), dump2dcm(1), dcmconv(1), dcmodify(1) -\section copyright COPYRIGHT +\section img2dcm_copyright COPYRIGHT Copyright (C) 2007-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmdata/docs/pdf2dcm.man b/dcmdata/docs/pdf2dcm.man index 377cfece..ca61c820 100644 --- a/dcmdata/docs/pdf2dcm.man +++ b/dcmdata/docs/pdf2dcm.man @@ -6,19 +6,19 @@ \page pdf2dcm pdf2dcm: Convert PDF file to DICOM \endif -\section synopsis SYNOPSIS +\section pdf2dcm_synopsis SYNOPSIS \verbatim pdf2dcm [options] pdffile-in dcmfile-out \endverbatim -\section description DESCRIPTION +\section pdf2dcm_description DESCRIPTION The \b pdf2dcm utility reads a PDF file (\e pdffile-in), converts it to a DICOM Encapsulated PDF Storage SOP instance and stores the converted data to an output file (\e dcmfile-out). -\section parameters PARAMETERS +\section pdf2dcm_parameters PARAMETERS \verbatim pdffile-in PDF input filename to be converted @@ -26,9 +26,9 @@ pdffile-in PDF input filename to be converted dcmfile-out DICOM output filename \endverbatim -\section options OPTIONS +\section pdf2dcm_options OPTIONS -\subsection general_options general options +\subsection pdf2dcm_general_options general options \verbatim -h --help print this help text and exit @@ -56,7 +56,7 @@ dcmfile-out DICOM output filename use config file f for the logger \endverbatim -\subsection dicom_document_options DICOM document options +\subsection pdf2dcm_dicom_document_options DICOM document options \verbatim burned-in annotation: @@ -112,7 +112,7 @@ instance number: use instance number i \endverbatim -\section logging LOGGING +\section pdf2dcm_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -131,7 +131,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section pdf2dcm_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -153,7 +153,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section pdf2dcm_environment ENVIRONMENT The \b pdf2dcm utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -169,11 +169,11 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section see_also SEE ALSO +\section pdf2dcm_see_also SEE ALSO dcm2pdf(1) -\section copyright COPYRIGHT +\section pdf2dcm_copyright COPYRIGHT Copyright (C) 2005-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmdata/docs/xml2dcm.man b/dcmdata/docs/xml2dcm.man index c54243bb..a65e4477 100644 --- a/dcmdata/docs/xml2dcm.man +++ b/dcmdata/docs/xml2dcm.man @@ -6,13 +6,13 @@ \page xml2dcm xml2dcm: Convert XML document to DICOM file or data set \endif -\section synopsis SYNOPSIS +\section xml2dcm_synopsis SYNOPSIS \verbatim xml2dcm [options] xmlfile-in dcmfile-out \endverbatim -\section description DESCRIPTION +\section xml2dcm_description DESCRIPTION The \b xml2dcm utility converts the contents of an XML (Extensible Markup Language) document to DICOM file or data set. The XML document is expected to @@ -20,7 +20,7 @@ validate against the DTD (Document Type Definition) which is described in file dcm2xml.dtd. An appropriate XML file can be created using the \b dcm2xml tool (option \e +Wb recommended to include binary data). -\section parameters PARAMETERS +\section xml2dcm_parameters PARAMETERS \verbatim xmlfile-in XML input filename to be converted (stdin: "-") @@ -28,9 +28,9 @@ xmlfile-in XML input filename to be converted (stdin: "-") dcmfile-out DICOM output filename \endverbatim -\section options OPTIONS +\section xml2dcm_options OPTIONS -\subsection general_options general options +\subsection xml2dcm_general_options general options \verbatim -h --help print this help text and exit @@ -58,7 +58,7 @@ dcmfile-out DICOM output filename use config file f for the logger \endverbatim -\subsection input_options input options +\subsection xml2dcm_input_options input options \verbatim input file format: @@ -69,7 +69,7 @@ input file format: ignore file meta information \endverbatim -\subsection processing_options processing options +\subsection xml2dcm_processing_options processing options \verbatim validation: @@ -91,7 +91,7 @@ unique identifiers: overwrite existing UIDs \endverbatim -\subsection output_options output options +\subsection xml2dcm_output_options output options \verbatim output file format: @@ -166,7 +166,7 @@ deflate compression level (only with --write-xfer-deflated): 0=uncompressed, 1=fastest, 9=best compression \endverbatim -\section notes NOTES +\section xml2dcm_notes NOTES The basic structure of the XML input expected looks like the following: @@ -211,7 +211,7 @@ The basic structure of the XML input expected looks like the following: The "file-format" and "meta-header" tags may be absent for DICOM data sets. -\subsection character_encoding Character Encoding +\subsection xml2dcm_character_encoding Character Encoding The DICOM character encoding is determined automatically from the element with tag "0008,0005" (Specific Character Set) - if present. The following @@ -238,7 +238,7 @@ multiplicity). See \b dcm2xml documentation for more details on the XML structure. -\subsection binary_data Binary Data +\subsection xml2dcm_binary_data Binary Data Binary data can be encoded either as a sequence of hex numbers separated by a backslash "\" or in Base64 format (binary="base64"). In addition, binary data @@ -254,14 +254,14 @@ expected to be little endian ordered and will be swapped if necessary. No checks will be made to ensure that the amount of data is reasonable in terms of other attributes such as Rows or Columns. -\subsection compression Compression +\subsection xml2dcm_compression Compression If libxml is compiled with zlib support, the input file (\e xmlfile-in) can also be compressed with ZIP, which usually results in much smaller files. See output of option \e --version in order to check whether zlib support is available. -\subsection limitations Limitations +\subsection xml2dcm_limitations Limitations Different versions of libxml might have different limits for the maximum length of an XML element value. Therefore, it should be avoided to use very @@ -271,7 +271,7 @@ Please note that \b xml2dcm currently does not fully support DICOMDIR files. Specifically, the value of the various offset data elements is not updated automatically by this tool. -\section logging LOGGING +\section xml2dcm_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -290,7 +290,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section xml2dcm_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -312,7 +312,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section xml2dcm_environment ENVIRONMENT The \b xml2dcm utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -328,15 +328,15 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section files FILES +\section xml2dcm_files FILES \/dcm2xml.dtd - Document Type Definition (DTD) file -\section see_also SEE ALSO +\section xml2dcm_see_also SEE ALSO dcm2xml(1) -\section copyright COPYRIGHT +\section xml2dcm_copyright COPYRIGHT Copyright (C) 2003-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmdata/include/CMakeLists.txt b/dcmdata/include/CMakeLists.txt index fb1b52f3..9537307a 100644 --- a/dcmdata/include/CMakeLists.txt +++ b/dcmdata/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmdata DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmdata DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmdata/include/dcmtk/dcmdata/dcbytstr.h b/dcmdata/include/dcmtk/dcmdata/dcbytstr.h index ecb8686e..4ec28f36 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcbytstr.h +++ b/dcmdata/include/dcmtk/dcmdata/dcbytstr.h @@ -90,13 +90,15 @@ class DCMTK_DCMDATA_EXPORT DcmByteString: public DcmElement * object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. - * -1 if either the value of the first component that does not match - * is lower in this object than in rhs, or all compared components match - * but this object has fewer components than rhs. Also returned if rhs - * cannot be casted to this object type. - * 1 if either the value of the first component that does not match - * is greater in this object than in rhs object, or all compared - * components match but the this component is longer. + * -1 if this element has fewer components than the rhs element. + * Also -1 if the value of the first component that does not match + * is lower in this object than in rhs. Also returned if rhs + * cannot be casted to this object type or both objects are of + * different VR (i.e. the DcmEVR returned by the element's ident() + * call are different). + * 1 if either this element has more components than the rhs element, or + * if the first component that does not match is greater in this object than + * in rhs object. */ virtual int compare(const DcmElement& rhs) const; @@ -291,6 +293,28 @@ class DCMTK_DCMDATA_EXPORT DcmByteString: public DcmElement virtual OFCondition writeJson(STD_NAMESPACE ostream &out, DcmJsonFormat &format); + /// @copydoc DcmElement::matches() + virtual OFBool matches(const DcmElement& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + + /** perform attribute matching on a single pair of string values. + * Compare two single string values using the attribute matching function appropriate for + * this element's VR (Universal Matching, Single Value Matching, Wild Card Matching or + * Range Matching). + * @note This method is called by the other overload of matches() for each combination of + * values in the key and candidate element (implementing multi value matching for + * elements with VM>1). + * @param key the key value to match against the candidate. + * @param candidate the candidate value to match the key against. + * @param enableWildCardMatching enable or disable wild card matching. Defaults to OFTrue, + * which means wild card matching is performed if the element's VR supports it. Set to + * OFFalse to force single value matching instead. + * @return OFTrue if the candidate string matches the key string, OFFalse otherwise. + */ + virtual OFBool matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + protected: /** constructor. Create new element from given tag and length. diff --git a/dcmdata/include/dcmtk/dcmdata/dcchrstr.h b/dcmdata/include/dcmtk/dcmdata/dcchrstr.h index 741ab78e..4abb828a 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcchrstr.h +++ b/dcmdata/include/dcmtk/dcmdata/dcchrstr.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -138,6 +138,14 @@ class DCMTK_DCMDATA_EXPORT DcmCharString virtual OFCondition writeJson(STD_NAMESPACE ostream &out, DcmJsonFormat &format); + // ensure inherited overloads of matches take part in overload resolution + using DcmByteString::matches; + + /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + virtual OFBool matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + protected: /** get value of the SpecificCharacterSet element of the surrounding dataset/item diff --git a/dcmdata/include/dcmtk/dcmdata/dcdatset.h b/dcmdata/include/dcmtk/dcmdata/dcdatset.h index 78a8bebe..069ea111 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcdatset.h +++ b/dcmdata/include/dcmtk/dcmdata/dcdatset.h @@ -185,6 +185,30 @@ class DCMTK_DCMDATA_EXPORT DcmDataset const E_GrpLenEncoding glenc = EGL_noChange, const Uint32 maxReadLength = DCM_MaxReadLength); + /** This function reads the information of all attributes which + * are captured in the input stream and captures this information + * in this->elementList, up to the attribute tag stopParsingAtElement. + * Each attribute is represented as an + * element in this list. Having read all information for this + * particular data set or command, this function will also take + * care of group length (according to what is specified in glenc) + * and padding elements (don't change anything). + * @param inStream The stream which contains the information. + * @param xfer The transfer syntax which was used to encode + * the information in inStream. + * @param glenc Encoding type for group length; specifies what + * will be done with group length tags. + * @param maxReadLength Maximum read length for reading an attribute value. + * @param stopParsingAtElement parsing of the input stream is stopped when + * this tag key or any higher tag is encountered. + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition readUntilTag(DcmInputStream &inStream, + const E_TransferSyntax xfer = EXS_Unknown, + const E_GrpLenEncoding glenc = EGL_noChange, + const Uint32 maxReadLength = DCM_MaxReadLength, + const DcmTagKey &stopParsingAtElement = DCM_UndefinedTagKey); + /** write dataset to a stream * @param outStream DICOM output stream * @param oxfer output transfer syntax (EXS_Unknown means use original) @@ -297,6 +321,27 @@ class DCMTK_DCMDATA_EXPORT DcmDataset const E_GrpLenEncoding groupLength = EGL_noChange, const Uint32 maxReadLength = DCM_MaxReadLength); + /** load object from a DICOM file, up to the attribute tag stopParsingAtElement. + * This method only supports DICOM objects stored as a dataset, i.e. without meta header. + * Use DcmFileFormat::loadFile() to load files with meta header. + * @param fileName name of the file to load (may contain wide chars if support enabled). + * Since there are various constructors for the OFFilename class, a "char *", "OFString" + * or "wchar_t *" can also be passed directly to this parameter. + * @param readXfer transfer syntax used to read the data (auto detection if EXS_Unknown) + * @param groupLength flag, specifying how to handle the group length tags + * @param maxReadLength maximum number of bytes to be read for an element value. + * Element values with a larger size are not loaded until their value is retrieved + * (with getXXX()) or loadAllDataIntoMemory() is called. + * @param stopParsingAtElement parsing of the input stream is stopped when + * this tag key or any higher tag is encountered. + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition loadFileUntilTag(const OFFilename &fileName, + const E_TransferSyntax readXfer = EXS_Unknown, + const E_GrpLenEncoding groupLength = EGL_noChange, + const Uint32 maxReadLength = DCM_MaxReadLength, + const DcmTagKey &stopParsingAtElement = DCM_UndefinedTagKey); + /** save object to a DICOM file. * This method only supports DICOM objects stored as a dataset, i.e. without meta header. * Use DcmFileFormat::saveFile() to save files with meta header. diff --git a/dcmdata/include/dcmtk/dcmdata/dcdeftag.h b/dcmdata/include/dcmtk/dcmdata/dcdeftag.h index 53c22fda..b1632596 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcdeftag.h +++ b/dcmdata/include/dcmtk/dcmdata/dcdeftag.h @@ -4,7 +4,7 @@ ** ** User: joergr ** Host: thinkpad -** Date: 2017-01-31 14:11:01 +** Date: 2017-06-15 10:51:06 ** Prog: /home/joergr/Source/dcmtk-full/public/dcmdata/libsrc/mkdeftag ** ** From: ../data/dicom.dic @@ -17,12 +17,12 @@ #include "dcmtk/dcmdata/dctagkey.h" -#define DCM_DICT_DEFTAG_BUILD_DATE "2017-01-31 14:11:01" +#define DCM_DICT_DEFTAG_BUILD_DATE "2017-06-15 10:51:06" /* ** Fixed Tags in ascending (gggg,eeee) order. -** Number of entries: 4176 +** Number of entries: 4229 ** Tags with a repeating component (repeating tags) are listed later. */ #define DCM_CommandGroupLength DcmTagKey(0x0000, 0x0000) @@ -342,7 +342,7 @@ #define DCM_GeneticModificationsDescription DcmTagKey(0x0010, 0x0222) #define DCM_GeneticModificationsNomenclature DcmTagKey(0x0010, 0x0223) #define DCM_GeneticModificationsCodeSequence DcmTagKey(0x0010, 0x0229) -#define DCM_OtherPatientIDs DcmTagKey(0x0010, 0x1000) +#define DCM_RETIRED_OtherPatientIDs DcmTagKey(0x0010, 0x1000) #define DCM_OtherPatientNames DcmTagKey(0x0010, 0x1001) #define DCM_OtherPatientIDsSequence DcmTagKey(0x0010, 0x1002) #define DCM_PatientBirthName DcmTagKey(0x0010, 0x1005) @@ -358,7 +358,7 @@ #define DCM_PatientMotherBirthName DcmTagKey(0x0010, 0x1060) #define DCM_MilitaryRank DcmTagKey(0x0010, 0x1080) #define DCM_BranchOfService DcmTagKey(0x0010, 0x1081) -#define DCM_MedicalRecordLocator DcmTagKey(0x0010, 0x1090) +#define DCM_RETIRED_MedicalRecordLocator DcmTagKey(0x0010, 0x1090) #define DCM_ReferencedPatientPhotoSequence DcmTagKey(0x0010, 0x1100) #define DCM_MedicalAlerts DcmTagKey(0x0010, 0x2000) #define DCM_Allergies DcmTagKey(0x0010, 0x2110) @@ -1669,6 +1669,25 @@ #define DCM_YCoordinatesCenterPixelViewAngle DcmTagKey(0x0022, 0x1529) #define DCM_NumberOfMapPoints DcmTagKey(0x0022, 0x1530) #define DCM_TwoDimensionalToThreeDimensionalMapData DcmTagKey(0x0022, 0x1531) +#define DCM_DerivationAlgorithmSequence DcmTagKey(0x0022, 0x1612) +#define DCM_OphthalmicImageTypeCodeSequence DcmTagKey(0x0022, 0x1615) +#define DCM_OphthalmicImageTypeDescription DcmTagKey(0x0022, 0x1616) +#define DCM_ScanPatternTypeCodeSequence DcmTagKey(0x0022, 0x1618) +#define DCM_ReferencedSurfaceMeshIdentificationSequence DcmTagKey(0x0022, 0x1620) +#define DCM_OphthalmicVolumetricPropertiesFlag DcmTagKey(0x0022, 0x1622) +#define DCM_OphthalmicAnatomicReferencePointXCoordinate DcmTagKey(0x0022, 0x1624) +#define DCM_OphthalmicAnatomicReferencePointYCoordinate DcmTagKey(0x0022, 0x1626) +#define DCM_OphthalmicEnFaceImageQualityRatingSequence DcmTagKey(0x0022, 0x1628) +#define DCM_QualityThreshold DcmTagKey(0x0022, 0x1630) +#define DCM_OCTBscanAnalysisAcquisitionParametersSequence DcmTagKey(0x0022, 0x1640) +#define DCM_NumberofBscansPerFrame DcmTagKey(0x0022, 0x1642) +#define DCM_BscanSlabThickness DcmTagKey(0x0022, 0x1643) +#define DCM_DistanceBetweenBscanSlabs DcmTagKey(0x0022, 0x1644) +#define DCM_BscanCycleTime DcmTagKey(0x0022, 0x1645) +#define DCM_BscanCycleTimeVector DcmTagKey(0x0022, 0x1646) +#define DCM_AscanRate DcmTagKey(0x0022, 0x1649) +#define DCM_BscanRate DcmTagKey(0x0022, 0x1650) +#define DCM_SurfaceMeshZPixelOffset DcmTagKey(0x0022, 0x1658) #define DCM_VisualFieldHorizontalExtent DcmTagKey(0x0024, 0x0010) #define DCM_VisualFieldVerticalExtent DcmTagKey(0x0024, 0x0011) #define DCM_VisualFieldShape DcmTagKey(0x0024, 0x0012) @@ -2284,6 +2303,7 @@ #define DCM_StorageURL DcmTagKey(0x0040, 0x4073) #define DCM_XDSStorageSequence DcmTagKey(0x0040, 0x4074) #define DCM_EntranceDoseInmGy DcmTagKey(0x0040, 0x8302) +#define DCM_EntranceDoseDerivation DcmTagKey(0x0040, 0x8303) #define DCM_ParametricMapFrameTypeSequence DcmTagKey(0x0040, 0x9092) #define DCM_ReferencedImageRealWorldValueMappingSequence DcmTagKey(0x0040, 0x9094) #define DCM_RealWorldValueMappingSequence DcmTagKey(0x0040, 0x9096) @@ -2799,7 +2819,7 @@ #define DCM_HPGLDocumentID DcmTagKey(0x0068, 0x62d0) #define DCM_HPGLDocumentLabel DcmTagKey(0x0068, 0x62d5) #define DCM_ViewOrientationCodeSequence DcmTagKey(0x0068, 0x62e0) -#define DCM_ViewOrientationModifier DcmTagKey(0x0068, 0x62f0) +#define DCM_ViewOrientationModifierCodeSequence DcmTagKey(0x0068, 0x62f0) #define DCM_HPGLDocumentScaling DcmTagKey(0x0068, 0x62f2) #define DCM_HPGLDocument DcmTagKey(0x0068, 0x6300) #define DCM_HPGLContourPenNumber DcmTagKey(0x0068, 0x6310) @@ -2968,9 +2988,14 @@ #define DCM_InputSequencePositionIndex DcmTagKey(0x0070, 0x1203) #define DCM_Crop DcmTagKey(0x0070, 0x1204) #define DCM_CroppingSpecificationIndex DcmTagKey(0x0070, 0x1205) -#define DCM_CompositingMethod DcmTagKey(0x0070, 0x1206) +#define DCM_RETIRED_CompositingMethod DcmTagKey(0x0070, 0x1206) #define DCM_VolumetricPresentationInputNumber DcmTagKey(0x0070, 0x1207) #define DCM_ImageVolumeGeometry DcmTagKey(0x0070, 0x1208) +#define DCM_VolumetricPresentationInputSetUID DcmTagKey(0x0070, 0x1209) +#define DCM_VolumetricPresentationInputSetSequence DcmTagKey(0x0070, 0x120a) +#define DCM_GlobalCrop DcmTagKey(0x0070, 0x120b) +#define DCM_GlobalCroppingSpecificationIndex DcmTagKey(0x0070, 0x120c) +#define DCM_RenderingMethod DcmTagKey(0x0070, 0x120d) #define DCM_VolumeCroppingSequence DcmTagKey(0x0070, 0x1301) #define DCM_VolumeCroppingMethod DcmTagKey(0x0070, 0x1302) #define DCM_BoundingBoxCrop DcmTagKey(0x0070, 0x1303) @@ -2988,6 +3013,18 @@ #define DCM_VolumetricCurvePoints DcmTagKey(0x0070, 0x150d) #define DCM_MPRViewHeightDirection DcmTagKey(0x0070, 0x1511) #define DCM_MPRViewHeight DcmTagKey(0x0070, 0x1512) +#define DCM_RenderProjection DcmTagKey(0x0070, 0x1602) +#define DCM_ViewpointPosition DcmTagKey(0x0070, 0x1603) +#define DCM_ViewpointLookAtPoint DcmTagKey(0x0070, 0x1604) +#define DCM_ViewpointUpDirection DcmTagKey(0x0070, 0x1605) +#define DCM_RenderFieldOfView DcmTagKey(0x0070, 0x1606) +#define DCM_SamplingStepSize DcmTagKey(0x0070, 0x1607) +#define DCM_ShadingStyle DcmTagKey(0x0070, 0x1701) +#define DCM_AmbientReflectionIntensity DcmTagKey(0x0070, 0x1702) +#define DCM_LightDirection DcmTagKey(0x0070, 0x1703) +#define DCM_DiffuseReflectionIntensity DcmTagKey(0x0070, 0x1704) +#define DCM_SpecularReflectionIntensity DcmTagKey(0x0070, 0x1705) +#define DCM_Shininess DcmTagKey(0x0070, 0x1706) #define DCM_PresentationStateClassificationComponentSequence DcmTagKey(0x0070, 0x1801) #define DCM_ComponentType DcmTagKey(0x0070, 0x1802) #define DCM_ComponentInputSequence DcmTagKey(0x0070, 0x1803) @@ -3005,6 +3042,21 @@ #define DCM_RecommendedAnimationRate DcmTagKey(0x0070, 0x1a03) #define DCM_AnimationCurveSequence DcmTagKey(0x0070, 0x1a04) #define DCM_AnimationStepSize DcmTagKey(0x0070, 0x1a05) +#define DCM_SwivelRange DcmTagKey(0x0070, 0x1a06) +#define DCM_VolumetricCurveUpDirections DcmTagKey(0x0070, 0x1a07) +#define DCM_VolumeStreamSequence DcmTagKey(0x0070, 0x1a08) +#define DCM_RGBATransferFunctionDescription DcmTagKey(0x0070, 0x1a09) +#define DCM_AdvancedBlendingSequence DcmTagKey(0x0070, 0x1b01) +#define DCM_BlendingInputNumber DcmTagKey(0x0070, 0x1b02) +#define DCM_BlendingDisplayInputSequence DcmTagKey(0x0070, 0x1b03) +#define DCM_BlendingDisplaySequence DcmTagKey(0x0070, 0x1b04) +#define DCM_BlendingMode DcmTagKey(0x0070, 0x1b06) +#define DCM_TimeSeriesBlending DcmTagKey(0x0070, 0x1b07) +#define DCM_GeometryForDisplay DcmTagKey(0x0070, 0x1b08) +#define DCM_ThresholdSequence DcmTagKey(0x0070, 0x1b11) +#define DCM_ThresholdValueSequence DcmTagKey(0x0070, 0x1b12) +#define DCM_ThresholdType DcmTagKey(0x0070, 0x1b13) +#define DCM_ThresholdValue DcmTagKey(0x0070, 0x1b14) #define DCM_HangingProtocolName DcmTagKey(0x0072, 0x0002) #define DCM_HangingProtocolDescription DcmTagKey(0x0072, 0x0004) #define DCM_HangingProtocolLevel DcmTagKey(0x0072, 0x0006) @@ -3686,6 +3738,7 @@ #define DCM_FractionPattern DcmTagKey(0x300a, 0x007b) #define DCM_NumberOfBeams DcmTagKey(0x300a, 0x0080) #define DCM_BeamDoseSpecificationPoint DcmTagKey(0x300a, 0x0082) +#define DCM_ReferencedDoseReferenceUID DcmTagKey(0x300a, 0x0083) #define DCM_BeamDose DcmTagKey(0x300a, 0x0084) #define DCM_BeamMeterset DcmTagKey(0x300a, 0x0086) #define DCM_RETIRED_BeamDosePointDepth DcmTagKey(0x300a, 0x0088) diff --git a/dcmdata/include/dcmtk/dcmdata/dcelem.h b/dcmdata/include/dcmtk/dcmdata/dcelem.h index f478c1f3..0dd220ff 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcelem.h +++ b/dcmdata/include/dcmtk/dcmdata/dcelem.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -82,15 +82,18 @@ class DCMTK_DCMDATA_EXPORT DcmElement * the object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. - * -1 if either the value of the first component that does not match - * is lower in this object than in rhs, or all compared components match - * but this object has fewer components than rhs. Also returned if rhs + * -1 if this element has fewer components than the rhs element. + * Also -1 if the value of the first component that does not match + * is lower in this object than in rhs. Also returned if rhs * cannot be casted to this object type or both objects are of * different VR (i.e. the DcmEVR returned by the element's ident() * call are different). - * 1 if either the value of the first component that does not match - * is greater in this object than in rhs object, or all compared - * components match but the this component is longer. + * 1 if either this element has more components than the rhs element, or + * if the first component that does not match is greater in this object than + * in rhs object. + * If the function is overwritten by derived classes, the behaviour might + * slightly change but all methods will return 0 on equality, and 1 or -1 + * if different. */ virtual int compare(const DcmElement& rhs) const =0; @@ -731,6 +734,41 @@ class DCMTK_DCMDATA_EXPORT DcmElement virtual OFCondition getDecompressedColorModel(DcmItem *dataset, OFString &decompressedColorModel); + /** perform attribute matching. + * Perform attribute matching on a candidate element using this element as the matching + * key. + * @note The given candidate element must refer to the same attribute kind, i.e. have the + * same tag and VR. The method will return OFFalse if it doesn't. + * @param candidate the candidate element to compare this element with. + * @param enableWildCardMatching enable or disable wild card matching. Defaults to OFTrue, + * which means wild card matching is performed if the element's VR supports it. Set to + * OFFalse to force single value matching instead. + * @return OFTrue if the candidate matches this element, OFFalse otherwise. + */ + virtual OFBool matches(const DcmElement& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + + /** perform combined attribute matching. + * Combine the given Attributes to one pair of matching key and candidate respectively + * and perform attribute matching on the result. + * @note The DICOM standard currently defines combined attribute matching for the VR + * DA in combination with TM, such that two attributes can be combined into a single + * attribute with VR=DT before matching against another pair of attributes with VR + * DA and TM. The method will return OFFalse if this element's VR is not DA or the + * given attributes are not of VR TM, DA and TM respectively. + * @param keySecond the second part of the matching key that will be combined with this + * element. + * @param candidateFirst the first part of the candidate that will be matched against this + * this element + keySecond. + * @param candidateSecond the second part of the candidate that will be combined with + * candidateFirst for matching against this elemement + keySecond. + * @return OFTrue if the combination of this elemement and keySecond match with the + * combination of candidateFirst and candidateSecond. OFFalse otherwise. + */ + virtual OFBool combinationMatches(const DcmElement& keySecond, + const DcmElement& candidateFirst, + const DcmElement& candidateSecond) const; + /* --- static helper functions --- */ /** scan string value for conformance with given value representation (VR) diff --git a/dcmdata/include/dcmtk/dcmdata/dcfilefo.h b/dcmdata/include/dcmtk/dcmdata/dcfilefo.h index 6d48e74d..85a9d5af 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcfilefo.h +++ b/dcmdata/include/dcmtk/dcmdata/dcfilefo.h @@ -185,6 +185,23 @@ class DCMTK_DCMDATA_EXPORT DcmFileFormat const E_GrpLenEncoding glenc = EGL_noChange, const Uint32 maxReadLength = DCM_MaxReadLength); + /** read object from a stream, up to the attribute tag stopParsingAtElement. + * @param inStream DICOM input stream + * @param xfer transfer syntax to use when parsing + * @param glenc handling of group length parameters + * @param maxReadLength attribute values larger than this value are skipped + * while parsing and read later upon first access if the stream type supports + * this. + * @param stopParsingAtElement parsing of the input stream is stopped when + * this tag key or any higher tag is encountered. + * @return EC_Normal if successful, an error code otherwise + */ + virtual OFCondition readUntilTag(DcmInputStream &inStream, + const E_TransferSyntax xfer = EXS_Unknown, + const E_GrpLenEncoding glenc = EGL_noChange, + const Uint32 maxReadLength = DCM_MaxReadLength, + const DcmTagKey &stopParsingAtElement = DCM_UndefinedTagKey); + /** write fileformat to a stream * @param outStream DICOM output stream * @param oxfer output transfer syntax @@ -278,6 +295,31 @@ class DCMTK_DCMDATA_EXPORT DcmFileFormat const Uint32 maxReadLength = DCM_MaxReadLength, const E_FileReadMode readMode = ERM_autoDetect); + /** load object from a DICOM file, up to the attribute tag stopParsingAtElement. + * This method supports DICOM objects stored as a file (with meta header) or as a + * dataset (without meta header). By default, the presence of a meta header is + * detected automatically. + * @param fileName name of the file to load (may contain wide chars if support enabled). + * Since there are various constructors for the OFFilename class, a "char *", "OFString" + * or "wchar_t *" can also be passed directly to this parameter. + * @param readXfer transfer syntax used to read the data (auto detection if EXS_Unknown) + * @param groupLength flag, specifying how to handle the group length tags + * @param maxReadLength maximum number of bytes to be read for an element value. + * Element values with a larger size are not loaded until their value is retrieved + * (with getXXX()) or loadAllDataIntoMemory() is called. + * @param readMode read file with or without meta header, i.e. as a fileformat or a + * dataset. Use ERM_fileOnly in order to force the presence of a meta header. + * @param stopParsingAtElement parsing of the input stream is stopped when + * this tag key or any higher tag is encountered. + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition loadFileUntilTag(const OFFilename &fileName, + const E_TransferSyntax readXfer = EXS_Unknown, + const E_GrpLenEncoding groupLength = EGL_noChange, + const Uint32 maxReadLength = DCM_MaxReadLength, + const E_FileReadMode readMode = ERM_autoDetect, + const DcmTagKey &stopParsingAtElement = DCM_UndefinedTagKey); + /** save object to a DICOM file. * @param fileName name of the file to save (may contain wide chars if support enabled). * Since there are various constructors for the OFFilename class, a "char *", "OFString" diff --git a/dcmdata/include/dcmtk/dcmdata/dchashdi.h b/dcmdata/include/dcmtk/dcmdata/dchashdi.h index e54fd84d..081feca3 100644 --- a/dcmdata/include/dcmtk/dcmdata/dchashdi.h +++ b/dcmdata/include/dcmtk/dcmdata/dchashdi.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2011, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -142,7 +142,7 @@ public: /// comparison equality OFBool operator==(const DcmHashDictIterator& x) const - { return (hindex == x.hindex) && (iter == x.iter); } + { return iterating ? x.iterating && (hindex == x.hindex) && (iter == x.iter) : !x.iterating; } /// comparison non-equality OFBool operator!=(const DcmHashDictIterator& x) const diff --git a/dcmdata/include/dcmtk/dcmdata/dcitem.h b/dcmdata/include/dcmtk/dcmdata/dcitem.h index a06dfa0d..c53e3ad5 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcitem.h +++ b/dcmdata/include/dcmtk/dcmdata/dcitem.h @@ -79,7 +79,7 @@ class DCMTK_DCMDATA_EXPORT DcmItem */ DcmItem &operator=(const DcmItem &obj); - /** comparison operator that compares the normalized value of this object + /** comparison operator that compares the value of this object * with a given object of the same type. The tag of the element is also * considered as the first component that is compared, followed by the * object types (VR, i.e. DCMTK'S EVR) and the comparison of all value @@ -89,13 +89,15 @@ class DCMTK_DCMDATA_EXPORT DcmItem * This may be an expensive operation. * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. - * -1 if either the value of the first component that does not match - * is lower in this object than in rhs, or all compared components match - * but this object has fewer components than rhs. Also returned if rhs - * cannot be casted to this object type. - * 1 if either the value of the first component that does not match - * is greater in this object than in rhs object, or all compared - * components match but the this component is longer. + * -1 if this element has fewer components than the rhs element. + * Also -1 if the value of the first component that does not match + * is lower in this object than in rhs. Also returned if rhs + * cannot be casted to this object type or both objects are of + * different VR (i.e. the DcmEVR returned by the element's ident() + * call are different). + * 1 if either this element has more components than the rhs element, or + * if the first component that does not match is greater in this object than + * in rhs object. */ virtual int compare(const DcmItem& rhs) const; @@ -243,6 +245,28 @@ class DCMTK_DCMDATA_EXPORT DcmItem const E_GrpLenEncoding glenc = EGL_noChange, const Uint32 maxReadLength = DCM_MaxReadLength); + /** This function reads the information of all attributes which + * are captured in the input stream and captures this information + * in elementList, up to the attribute tag stopParsingAtElement. + * Each attribute is represented as an element + * in this list. If not all information for an attribute could be + * read from the stream, the function returns EC_StreamNotifyClient. + * @param inStream The stream which contains the information. + * @param ixfer The transfer syntax which was used to encode + * the information in inStream. + * @param glenc Encoding type for group length; specifies + * what will be done with group length tags. + * @param maxReadLength Maximum read length for reading an attribute value. + * @param stopParsingAtElement parsing of the input stream is stopped when + * this tag key or any higher tag is encountered. + * @return status, EC_Normal if successful, an error code otherwise + */ + virtual OFCondition readUntilTag(DcmInputStream &inStream, + const E_TransferSyntax ixfer, + const E_GrpLenEncoding glenc = EGL_noChange, + const Uint32 maxReadLength = DCM_MaxReadLength, + const DcmTagKey &stopParsingAtElement = DCM_UndefinedTagKey); + /** write object to a stream * @param outStream DICOM output stream * @param oxfer output transfer syntax @@ -1211,20 +1235,45 @@ class DCMTK_DCMDATA_EXPORT DcmItem DcmItem *item, const signed long itemNum = -2); - /** creates new DICOM element from given attribute tag + /** creates new DICOM element from given attribute tag. + * Creation of unknown attributes (e.g. private tag not being registered + * in the dictionary) will result in a DcmElement instance of derived type + * DcmOtherByteOtherWord. * @param tag attribute tag of the element to be created + * @param privateCreator private creator of the element, if element tag + * is private (default: NULL, i.e. non-private DICOM standard tag) * @return pointer to newly created element upon success, NULL pointer otherwise + * */ - static DcmElement *newDicomElement(const DcmTagKey &tag); + static DcmElement *newDicomElement(const DcmTagKey &tag, + const char *privateCreator = NULL); - /** creates new DICOM element from given attribute tag + /** creates new DICOM element from given attribute tag. + * Creation of unknown attributes (e.g. private tag not being registered + * in the dictionary) will result in a DcmElement instance of derived type + * DcmOtherByteOtherWord. * @param newElement pointer to newly created element returned in this parameter * upon success, NULL pointer otherwise * @param tag attribute tag of the element to be created + * @param privateCreator private creator of the element, if element tag + * is private (default: NULL, i.e. non-private DICOM standard tag) * @return EC_Normal upon success, an error code otherwise */ static OFCondition newDicomElement(DcmElement *&newElement, - const DcmTagKey &tag); + const DcmTagKey &tag, + const char *privateCreator = NULL); + + /** creates new DICOM element from given attribute tag and VR. + * Creation of unknown attributes (e.g. private tag not being registered + * in the dictionary) will result in a DcmElement instance of derived type + * DcmOtherByteOtherWord. + * @param newElement pointer to newly created element returned in this parameter + * upon success, NULL pointer otherwise + * @param tag attribute tag and VR of the element to be created + * @return EC_Normal upon success, an error code otherwise + */ + static OFCondition newDicomElementWithVR(DcmElement *&newElement, + const DcmTag &tag); protected: diff --git a/dcmdata/include/dcmtk/dcmdata/dcjson.h b/dcmdata/include/dcmtk/dcmdata/dcjson.h index 6fa0c27c..ac7a2d2b 100755 --- a/dcmdata/include/dcmtk/dcmdata/dcjson.h +++ b/dcmdata/include/dcmtk/dcmdata/dcjson.h @@ -56,8 +56,8 @@ * @code{.cpp} struct CustomJsonFormat : DcmJsonFormatPretty { - CustomJsonFormat(const OFBool printMetaheaderInformation = OFTrue) - : DcmJsonFormatPretty(printMetaheaderInformation) + CustomJsonFormat(const OFBool printMetaInfo = OFTrue) + : DcmJsonFormatPretty(printMetaInfo) { } @@ -196,10 +196,10 @@ public: OFString &value); /** Constructor - * @param printMetaheaderInformation parameter that defines if meta information should be written + * @param printMetaInfo parameter that defines if meta information should be written */ - inline DcmJsonFormat(const OFBool printMetaheaderInformation) - : printMetaheaderInformation(printMetaheaderInformation) + inline DcmJsonFormat(const OFBool printMetaInfo) + : printMetaheaderInformation(printMetaInfo) { } @@ -233,9 +233,9 @@ public: * @code{.cpp} struct BulkDataURIJsonFormat : DcmJsonFormatPretty { - CustomJsonFormat(const OFBool printMetaheaderInformation = OFTrue, + CustomJsonFormat(const OFBool printMetaInfo = OFTrue, ... bulkDataURIDatabase) - : DcmJsonFormatPretty(printMetaheaderInformation) + : DcmJsonFormatPretty(printMetaInfo) , TheDatabase(bulkDataURIDatabase) { @@ -341,9 +341,9 @@ private: public: /** DcmJsonFormatPretty constructor - * @param printMetaheaderInformation Enable/Disable including Metaheader in the output + * @param printMetaInfo Enable/Disable including Metaheader in the output */ - explicit DcmJsonFormatPretty(const OFBool printMetaheaderInformation = OFTrue); + explicit DcmJsonFormatPretty(const OFBool printMetaInfo = OFTrue); /** Indent to the specific level. * @param out output stream to which the indention is written. @@ -376,9 +376,9 @@ class DCMTK_DCMDATA_EXPORT DcmJsonFormatCompact : public DcmJsonFormat { public: /** DcmJsonFormatCompact constructor - * @param printMetaheaderInformation Enable/Disable including Metaheader in the output + * @param printMetaInfo Enable/Disable including Metaheader in the output */ - explicit DcmJsonFormatCompact(const OFBool printMetaheaderInformation = OFTrue); + explicit DcmJsonFormatCompact(const OFBool printMetaInfo = OFTrue); /** Does nothing. * @param out output stream to which the indention is written. diff --git a/dcmdata/include/dcmtk/dcmdata/dcmatch.h b/dcmdata/include/dcmtk/dcmdata/dcmatch.h index 31e1b7e4..440b5460 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcmatch.h +++ b/dcmdata/include/dcmtk/dcmdata/dcmatch.h @@ -177,7 +177,7 @@ public: /** Test whether this object may be used for matching, i.e.\ whether it is not empty. * @return OFTrue if this object may be used for matching, OFFalse otherwise. */ -#ifdef DCMTK_USE_CXX11_STL +#ifdef HAVE_CXX11 explicit #endif operator OFBool() const; diff --git a/dcmdata/include/dcmtk/dcmdata/dcpixel.h b/dcmdata/include/dcmtk/dcmdata/dcpixel.h index 25a296cb..26e9273e 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcpixel.h +++ b/dcmdata/include/dcmtk/dcmdata/dcpixel.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2011, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -151,7 +151,7 @@ private: /// List of representations of pixel data DcmRepresentationList repList; - /// Iterator to the last dummy element in representation lis + /// Iterator to the last dummy element in representation list DcmRepresentationListIterator repListEnd; /// Iterator to the original representation. if an uncompressed @@ -276,7 +276,21 @@ public: return new DcmPixelData(*this); } - /** Virtual object copying. This method can be used for DcmObject + /** comparison operator that compares the value of this element + * with a given element of the same type (e.g. an DcmPixelData with a + * DcmPixelData). The tag of the element is also considered as the first + * component that is compared, followed by the object types (VR, i.e. DCMTK'S EVR). + * The DcmPixelData implementation checks whether the uncompressed data of + * both objects are identical, and if not provided, if the compressed data + * of both objects is the same, by comparing the pixel items bytewise. + * @param rhs the right hand side of the comparison + * @return 0 if the object values are equal. + * -1 is returned if rhs is considered greater than this object. + * 1 is returned if rhs is considered smaller than this object. + */ + virtual int compare(const DcmElement& rhs) const; + + /** virtual object copying. This method can be used for DcmObject * and derived classes to get a deep copy of an object. Internally * the assignment operator is called if the given DcmObject parameter * is of the same type as "this" object instance. If not, an error diff --git a/dcmdata/include/dcmtk/dcmdata/dcpixseq.h b/dcmdata/include/dcmtk/dcmdata/dcpixseq.h index ccb7db5d..c19a9a8d 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcpixseq.h +++ b/dcmdata/include/dcmtk/dcmdata/dcpixseq.h @@ -48,6 +48,7 @@ class DcmPixelItem; * the pixel data tag (7FE0,0010) and OB value representation with undefined length, * and the "items" contained within the sequence are in fact pixel items (class DcmPixelItem) * that contain no list of DICOM elements but raw compressed pixel data. + * The first item in this pixel sequence must always be the offset table. */ class DCMTK_DCMDATA_EXPORT DcmPixelSequence : public DcmSequenceOfItems { @@ -234,7 +235,8 @@ public: * @param offsetList list containing offset table entries. * Upon success, an entry is appended to the list. The offset values are always even, * so it is expected that odd length pixel items are padded later during writing. - * @param compressedData pointer to compressed image data, must not be NULL + * The offsets are not stored internally. + * @param compressedData pointer to compressed image data (copied), must not be NULL * @param compressedLen number of bytes of compressed image data * @param fragmentSize maximum fragment size (in kbytes) for compression, 0 for unlimited. * @return EC_Normal if successful, an error code otherwise diff --git a/dcmdata/include/dcmtk/dcmdata/dcsequen.h b/dcmdata/include/dcmtk/dcmdata/dcsequen.h index f4839dbe..f23f2542 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcsequen.h +++ b/dcmdata/include/dcmtk/dcmdata/dcsequen.h @@ -77,13 +77,15 @@ public: * an expensive operation! * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. - * -1 if either the value of the first component that does not match - * is lower in this object than in rhs, or all compared components match - * but this object has fewer components than rhs. Also returned if rhs - * cannot be casted to this object type. - * 1 if either the value of the first component that does not match - * is greater in this object than in rhs object, or all compared - * components match but the this component is longer. + * -1 if this element has fewer components than the rhs element. + * Also -1 if the value of the first component that does not match + * is lower in this object than in rhs. Also returned if rhs + * cannot be casted to this object type or both objects are of + * different VR (i.e. the DcmEVR returned by the element's ident() + * call are different). + * 1 if either this element has more components than the rhs element, or + * if the first component that does not match is greater in this object than + * in rhs object. */ virtual int compare(const DcmElement& rhs) const; diff --git a/dcmdata/include/dcmtk/dcmdata/dcspchrs.h b/dcmdata/include/dcmtk/dcmdata/dcspchrs.h index d4d8fc0a..eee88e23 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcspchrs.h +++ b/dcmdata/include/dcmtk/dcmdata/dcspchrs.h @@ -65,7 +65,7 @@ class DCMTK_DCMDATA_EXPORT DcmSpecificCharacterSet * @return OFTrue if selectCharacterSet() was successfully called before, * OFFalse if not (or clear() has been called in the meantime). */ -#ifdef DCMTK_USE_CXX11_STL +#ifdef HAVE_CXX11 explicit #endif operator OFBool() const; diff --git a/dcmdata/include/dcmtk/dcmdata/dcuid.h b/dcmdata/include/dcmtk/dcmdata/dcuid.h index dd5e307c..0762a994 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcuid.h +++ b/dcmdata/include/dcmtk/dcmdata/dcuid.h @@ -383,6 +383,11 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID */ #define UID_XMLEncodingTransferSyntax "1.2.840.10008.1.2.6.2" +/** Private transfer syntax defined by GE. This transfer syntax is identical to + * Implicit VR Little Endian, except that Pixel Data are encoded in big endian. + */ +#define UID_PrivateGE_LEI_WithBigEndianPixelDataTransferSyntax "1.2.840.113619.5.2" + /* ** Defined SOP Class UIDs according to DICOM standard */ @@ -437,6 +442,10 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID #define UID_XAXRFGrayscaleSoftcopyPresentationStateStorage "1.2.840.10008.5.1.4.1.1.11.5" #define UID_GrayscalePlanarMPRVolumetricPresentationStateStorage "1.2.840.10008.5.1.4.1.1.11.6" #define UID_CompositingPlanarMPRVolumetricPresentationStateStorage "1.2.840.10008.5.1.4.1.1.11.7" +#define UID_AdvancedBlendingPresentationStateStorage "1.2.840.10008.5.1.4.1.1.11.8" +#define UID_VolumeRenderingVolumetricPresentationStateStorage "1.2.840.10008.5.1.4.1.1.11.9" +#define UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage "1.2.840.10008.5.1.4.1.1.11.10" +#define UID_MultipleVolumeRenderingVolumetricPresentationStateStorage "1.2.840.10008.5.1.4.1.1.11.11" #define UID_XRayAngiographicImageStorage "1.2.840.10008.5.1.4.1.1.12.1" #define UID_EnhancedXAImageStorage "1.2.840.10008.5.1.4.1.1.12.1.1" #define UID_XRayRadiofluoroscopicImageStorage "1.2.840.10008.5.1.4.1.1.12.2" @@ -475,6 +484,8 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID #define UID_OphthalmicTomographyImageStorage "1.2.840.10008.5.1.4.1.1.77.1.5.4" #define UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage "1.2.840.10008.5.1.4.1.1.77.1.5.5" #define UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage "1.2.840.10008.5.1.4.1.1.77.1.5.6" +#define UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage "1.2.840.10008.5.1.4.1.1.77.1.5.7" +#define UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage "1.2.840.10008.5.1.4.1.1.77.1.5.8" #define UID_VLWholeSlideMicroscopyImageStorage "1.2.840.10008.5.1.4.1.1.77.1.6" #define UID_RETIRED_VLMultiFrameImageStorage "1.2.840.10008.5.1.4.1.1.77.2" #define UID_LensometryMeasurementsStorage "1.2.840.10008.5.1.4.1.1.78.1" @@ -504,6 +515,7 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID #define UID_ImplantationPlanSRDocumentStorage "1.2.840.10008.5.1.4.1.1.88.70" #define UID_AcquisitionContextSRStorage "1.2.840.10008.5.1.4.1.1.88.71" #define UID_SimplifiedAdultEchoSRStorage "1.2.840.10008.5.1.4.1.1.88.72" +#define UID_PatientRadiationDoseSRStorage "1.2.840.10008.5.1.4.1.1.88.73" #define UID_ContentAssessmentResultsStorage "1.2.840.10008.5.1.4.1.1.90.1" #define UID_EncapsulatedPDFStorage "1.2.840.10008.5.1.4.1.1.104.1" #define UID_EncapsulatedCDAStorage "1.2.840.10008.5.1.4.1.1.104.2" diff --git a/dcmdata/include/dcmtk/dcmdata/dcvr.h b/dcmdata/include/dcmtk/dcmdata/dcvr.h index 87e4c132..ff49abf5 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvr.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvr.h @@ -337,7 +337,7 @@ public: */ const char* getVRName() const ; - /** get symbolic standard VR name for this object + /** get symbolic standard VR name for this object. * If this object manages a non-standard, internal VR such as EVR_ox, * this method returns the name of the VR to which the internal VR will * be mapped when writing the DICOM object. @@ -375,7 +375,7 @@ public: */ OFBool usesExtendedLengthEncoding() const; - /** check if VRs are equivalent + /** check if VRs are equivalent. * VRs are considered equivalent if equal or if one of them is an internal * VR and the other one is a possible standard VR to which the internal one * maps. @@ -388,14 +388,16 @@ public: ** (in bytes assuming single byte characters) */ - /** return minimum length of a value with this VR (in bytes), assuming - * single byte characters + /** return minimum length of a single value with this VR. + * Whether the returned length is in bytes or characters can be determined + * by isLengthInChar(). * @return minimum length of a value */ Uint32 getMinValueLength() const; - /** return maximum length of a value with this VR (in bytes), assuming - * single byte characters + /** return maximum length of a single value with this VR. + * Whether the returned length is in bytes or characters can be determined + * by isLengthInChar(). * @return maximum length of a value */ Uint32 getMaxValueLength() const; @@ -414,6 +416,12 @@ public: */ const OFString& getDelimiterChars() const; + /** check whether the maximum or minimum length of a value with this VR is + * in bytes or characters. See getMinValueLength() and getMaxValueLength(). + * @return true if length is stated in characters, false if in bytes + */ + OFBool isLengthInChar() const; + private: /// the enumerated VR value DcmEVR vr; diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrae.h b/dcmdata/include/dcmtk/dcmdata/dcvrae.h index 1c25e81a..ef8dd489 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrae.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrae.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2013, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -105,6 +105,14 @@ class DCMTK_DCMDATA_EXPORT DcmApplicationEntity const unsigned long pos, OFBool normalize = OFTrue); + // ensure inherited overloads of matches take part in overload resolution + using DcmByteString::matches; + + /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + virtual OFBool matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + /* --- static helper functions --- */ /** check whether given string value conforms to the VR "AE" (Application Entity) diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrat.h b/dcmdata/include/dcmtk/dcmdata/dcvrat.h index b92d6a22..51ba17a6 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrat.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrat.h @@ -73,13 +73,15 @@ class DCMTK_DCMDATA_EXPORT DcmAttributeTag * object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. - * -1 if either the value of the first component that does not match - * is lower in this object than in rhs, or all compared components match - * but this object has fewer components than rhs. Also returned if rhs - * cannot be casted to this object type. - * 1 if either the value of the first component that does not match - * is greater in this object than in rhs object, or all compared - * components match but the this component is longer. + * -1 if this element has fewer components than the rhs element. + * Also -1 if the value of the first component that does not match + * is lower in this object than in rhs. Also returned if rhs + * cannot be casted to this object type or both objects are of + * different VR (i.e. the DcmEVR returned by the element's ident() + * call are different). + * 1 if either this element has more components than the rhs element, or + * if the first component that does not match is greater in this object than + * in rhs object. */ virtual int compare(const DcmElement& rhs) const; diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrcs.h b/dcmdata/include/dcmtk/dcmdata/dcvrcs.h index 295eca3b..27e1fe41 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrcs.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrcs.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2013, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -105,6 +105,14 @@ class DCMTK_DCMDATA_EXPORT DcmCodeString const unsigned long pos, OFBool normalize = OFTrue); + // ensure inherited overloads of matches take part in overload resolution + using DcmByteString::matches; + + /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + virtual OFBool matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + /* --- static helper functions --- */ /** check whether given value conforms to value representation CS (Code String). diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrda.h b/dcmdata/include/dcmtk/dcmdata/dcvrda.h index ed75bdaf..8e216272 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrda.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrda.h @@ -147,6 +147,19 @@ class DCMTK_DCMDATA_EXPORT DcmDate const unsigned long pos = 0, const OFBool supportOldFormat = OFTrue); + // ensure inherited overloads of matches take part in overload resolution + using DcmByteString::matches; + + /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + virtual OFBool matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + + /// @copydoc DcmElement::combinationMatches() + virtual OFBool combinationMatches(const DcmElement& keySecond, + const DcmElement& candidateFirst, + const DcmElement& candidateSecond) const; + /* --- static helper functions --- */ /** get the current system date. diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrdt.h b/dcmdata/include/dcmtk/dcmdata/dcvrdt.h index b900d6b6..c5d49f21 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrdt.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrdt.h @@ -170,6 +170,14 @@ class DCMTK_DCMDATA_EXPORT DcmDateTime const OFString &dateTimeSeparator = " ", const OFString &timeZoneSeparator = " "); + // ensure inherited overloads of matches take part in overload resolution + using DcmByteString::matches; + + /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + virtual OFBool matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + /* --- static helper functions --- */ /** get the current system date and time. diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrfd.h b/dcmdata/include/dcmtk/dcmdata/dcvrfd.h index bde2163b..485e3048 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrfd.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrfd.h @@ -205,6 +205,10 @@ class DCMTK_DCMDATA_EXPORT DcmFloatingPointDouble */ virtual OFCondition verify(const OFBool autocorrect = OFFalse); + /// @copydoc DcmElement::matches() + virtual OFBool matches(const DcmElement& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + protected: /** constructor. Create new element from given tag and length. diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrfl.h b/dcmdata/include/dcmtk/dcmdata/dcvrfl.h index cf2d870b..4b13ebd4 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrfl.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrfl.h @@ -69,13 +69,15 @@ class DCMTK_DCMDATA_EXPORT DcmFloatingPointSingle * object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. - * -1 if either the value of the first component that does not match - * is lower in this object than in rhs, or all compared components match - * but this object has fewer components than rhs. Also returned if rhs - * cannot be casted to this object type. - * 1 if either the value of the first component that does not match - * is greater in this object than in rhs object, or all compared - * components match but the this component is longer. + * -1 if this element has fewer components than the rhs element. + * Also -1 if either the value of the first component that does not match + * is lower in this object than in rhs. Also returned if rhs + * cannot be casted to this object type or both objects are of + * different VR (i.e. the DcmEVR returned by the element's ident() + * call are different). + * 1 if either this element has more components than the rhs element, or + * if the first component that does not match is greater in this object than + * in rhs object. */ virtual int compare(const DcmElement& rhs) const; @@ -205,6 +207,10 @@ class DCMTK_DCMDATA_EXPORT DcmFloatingPointSingle */ virtual OFCondition verify(const OFBool autocorrect = OFFalse); + /// @copydoc DcmElement::matches() + virtual OFBool matches(const DcmElement& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + protected: /** constructor. Create new element from given tag and length. diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrlo.h b/dcmdata/include/dcmtk/dcmdata/dcvrlo.h index 08341828..28b8f696 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrlo.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrlo.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -89,7 +89,9 @@ class DCMTK_DCMDATA_EXPORT DcmLongString */ virtual DcmEVR ident() const; - /** check whether stored value conforms to the VR and to the specified VM + /** check whether stored value conforms to the VR and to the specified VM. + * Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100). + * All other specific character sets disable the check of the value representation. * @param vm value multiplicity (according to the data dictionary) to be checked for. * (See DcmElement::checkVM() for a list of valid values.) * @param oldFormat parameter not used for this VR (only for DA, TM) diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrlt.h b/dcmdata/include/dcmtk/dcmdata/dcvrlt.h index 50f324c7..2709cf12 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrlt.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrlt.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -84,7 +84,9 @@ class DCMTK_DCMDATA_EXPORT DcmLongText */ virtual DcmEVR ident() const; - /** check whether stored value conforms to the VR and to the specified VM + /** check whether stored value conforms to the VR and to the specified VM. + * Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100). + * All other specific character sets disable the check of the value representation. * @param vm parameter not used for this VR * @param oldFormat parameter not used for this VR (only for DA, TM) * @return status of the check, EC_Normal if value is correct, an error code otherwise diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrobow.h b/dcmdata/include/dcmtk/dcmdata/dcvrobow.h index 26e354ac..7e0237f2 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrobow.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrobow.h @@ -61,16 +61,19 @@ class DCMTK_DCMDATA_EXPORT DcmOtherByteOtherWord * considered as the first component that is compared, followed by the * object types (VR, i.e. DCMTK'S EVR) and the comparison of all value * components of the object, preferrably in the order declared in the - * object (if applicable). + * object (if applicable). The implementation for DcmOtherByteOtherWord + * does compare the values of two elements in local endianness. * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. - * -1 if either the value of the first component that does not match - * is lower in this object than in rhs, or all compared components match - * but this object has fewer components than rhs. Also returned if rhs - * cannot be casted to this object type. - * 1 if either the value of the first component that does not match - * is greater in this object than in rhs object, or all compared - * components match but the this component is longer. + * -1 if this element has fewer components than the rhs element. + * Also -1 if the value of the first component that does not match + * is lower in this object than in rhs. Also returned if rhs + * cannot be casted to this object type or both objects are of + * different VR (i.e. the DcmEVR returned by the element's ident() + * call are different). + * 1 if either this element has more components than the rhs element, or + * if the first component that does not match is greater in this object than + * in rhs object. */ virtual int compare(const DcmElement& rhs) const; diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrpn.h b/dcmdata/include/dcmtk/dcmdata/dcvrpn.h index 4264691f..751f29a8 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrpn.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrpn.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -89,7 +89,9 @@ class DCMTK_DCMDATA_EXPORT DcmPersonName */ virtual DcmEVR ident() const; - /** check whether stored value conforms to the VR and to the specified VM + /** check whether stored value conforms to the VR and to the specified VM. + * Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100). + * All other specific character sets disable the check of the value representation. * @param vm value multiplicity (according to the data dictionary) to be checked for. * (See DcmElement::checkVM() for a list of valid values.) * @param oldFormat parameter not used for this VR (only for DA, TM) diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrpobw.h b/dcmdata/include/dcmtk/dcmdata/dcvrpobw.h index 3768c896..48b97f58 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrpobw.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrpobw.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -64,6 +64,27 @@ public: return new DcmPolymorphOBOW(*this); } + /** Comparison operator that compares the normalized value of this element + * with a given element of the same type (e.g. an DcmPolymorphOBOW with a + * DcmPolymorphOBOW). The tag of the element is also considered as the first + * component that is compared, followed by the object types (VR, i.e. DCMTK'S EVR). + * The DcmPolymorphOBOW implementation checks then whether the length of both + * elements are equal and if so continues comparing the values serialized to + * Little Endian using memcpy. + * @param rhs the right hand side of the comparison + * @return 0 if the object values are equal. + * -1 if this element has fewer components than the rhs element. + * Also -1 if the value of the first component that does not match + * is lower in this object than in rhs. Also returned if rhs + * cannot be casted to this object type or both objects are of + * different VR (i.e. the DcmEVR returned by the element's ident() + * call are different). + * 1 if either this element has more components than the rhs element, or + * if the first component that does not match is greater in this object than + * in rhs object. + */ + virtual int compare(const DcmElement& rhs) const; + /** Virtual object copying. This method can be used for DcmObject * and derived classes to get a deep copy of an object. Internally * the assignment operator is called if the given DcmObject parameter diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrsh.h b/dcmdata/include/dcmtk/dcmdata/dcvrsh.h index d365ac94..7e572f6c 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrsh.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrsh.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -90,7 +90,9 @@ class DCMTK_DCMDATA_EXPORT DcmShortString */ virtual DcmEVR ident() const; - /** check whether stored value conforms to the VR and to the specified VM + /** check whether stored value conforms to the VR and to the specified VM. + * Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100). + * All other specific character sets disable the check of the value representation. * @param vm value multiplicity (according to the data dictionary) to be checked for. * (See DcmElement::checkVM() for a list of valid values.) * @param oldFormat parameter not used for this VR (only for DA, TM) diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrsl.h b/dcmdata/include/dcmtk/dcmdata/dcvrsl.h index 0d98493d..5e221c32 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrsl.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrsl.h @@ -69,13 +69,15 @@ class DCMTK_DCMDATA_EXPORT DcmSignedLong * object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. - * -1 if either the value of the first component that does not match - * is lower in this object than in rhs, or all compared components match - * but this object has fewer components than rhs. Also returned if rhs - * cannot be casted to this object type. - * 1 if either the value of the first component that does not match - * is greater in this object than in rhs object, or all compared - * components match but the this component is longer. + * -1 if this element has fewer components than the rhs element. + * Also -1 if the value of the first component that does not match + * is lower in this object than in rhs. Also returned if rhs + * cannot be casted to this object type or both objects are of + * different VR (i.e. the DcmEVR returned by the element's ident() + * call are different). + * 1 if either this element has more components than the rhs element, or + * if the first component that does not match is greater in this object than + * in rhs object. */ virtual int compare(const DcmElement& rhs) const; @@ -202,6 +204,10 @@ class DCMTK_DCMDATA_EXPORT DcmSignedLong */ virtual OFCondition verify(const OFBool autocorrect = OFFalse); + /// @copydoc DcmElement::matches() + virtual OFBool matches(const DcmElement& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + protected: /** constructor. Create new element from given tag and length. diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrss.h b/dcmdata/include/dcmtk/dcmdata/dcvrss.h index 47d94aa3..1556b1a9 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrss.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrss.h @@ -63,13 +63,15 @@ class DCMTK_DCMDATA_EXPORT DcmSignedShort * object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. - * -1 if either the value of the first component that does not match - * is lower in this object than in rhs, or all compared components match - * but this object has fewer components than rhs. Also returned if rhs - * cannot be casted to this object type. - * 1 if either the value of the first component that does not match - * is greater in this object than in rhs object, or all compared - * components match but the this component is longer. + * -1 if this element has fewer components than the rhs element. + * Also -1 if the value of the first component that does not match + * is lower in this object than in rhs. Also returned if rhs + * cannot be casted to this object type or both objects are of + * different VR (i.e. the DcmEVR returned by the element's ident() + * call are different). + * 1 if either this element has more components than the rhs element, or + * if the first component that does not match is greater in this object than + * in rhs object. */ virtual int compare(const DcmElement& rhs) const; @@ -202,6 +204,10 @@ class DCMTK_DCMDATA_EXPORT DcmSignedShort */ virtual OFCondition verify(const OFBool autocorrect = OFFalse); + /// @copydoc DcmElement::matches() + virtual OFBool matches(const DcmElement& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + protected: /** constructor. Create new element from given tag and length. diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrst.h b/dcmdata/include/dcmtk/dcmdata/dcvrst.h index 45362494..490b6bb0 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrst.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrst.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -85,7 +85,9 @@ class DCMTK_DCMDATA_EXPORT DcmShortText */ virtual DcmEVR ident() const; - /** check whether stored value conforms to the VR and to the specified VM + /** check whether stored value conforms to the VR and to the specified VM. + * Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100). + * All other specific character sets disable the check of the value representation. * @param vm parameter not used for this VR * @param oldFormat parameter not used for this VR (only for DA, TM) * @return status of the check, EC_Normal if value is correct, an error code otherwise diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrtm.h b/dcmdata/include/dcmtk/dcmdata/dcvrtm.h index 0b724739..f475717a 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrtm.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrtm.h @@ -167,6 +167,14 @@ class DCMTK_DCMDATA_EXPORT DcmTime const OFBool createMissingPart = OFFalse, const OFBool supportOldFormat = OFTrue); + // ensure inherited overloads of matches take part in overload resolution + using DcmByteString::matches; + + /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + virtual OFBool matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + /* --- static helper functions --- */ /** get the current system time. @@ -378,6 +386,9 @@ class DCMTK_DCMDATA_EXPORT DcmTime private: + /// give DcmDate access to our private parts, for combined date time range matching. + friend class DcmDate; + /** parse the fragment part of a DICOM time string. * @param string a pointer to the beginning of the fragment portion of a DICOM time string. * @param size the size (in bytes) of the given string value. diff --git a/dcmdata/include/dcmtk/dcmdata/dcvruc.h b/dcmdata/include/dcmtk/dcmdata/dcvruc.h index 3833240c..f72add22 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvruc.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvruc.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, OFFIS e.V. + * Copyright (C) 2015-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -86,7 +86,9 @@ class DCMTK_DCMDATA_EXPORT DcmUnlimitedCharacters */ virtual DcmEVR ident() const; - /** check whether stored value conforms to the VR and to the specified VM + /** check whether stored value conforms to the VR and to the specified VM. + * Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100). + * All other specific character sets disable the check of the value representation. * @param vm value multiplicity (according to the data dictionary) to be checked for. * (See DcmElement::checkVM() for a list of valid values.) * @param oldFormat parameter not used for this VR (only for DA, TM) diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrui.h b/dcmdata/include/dcmtk/dcmdata/dcvrui.h index eba453f9..8fc27e43 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrui.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrui.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2013, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrul.h b/dcmdata/include/dcmtk/dcmdata/dcvrul.h index fa61c243..bb56d62a 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrul.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrul.h @@ -69,13 +69,15 @@ class DCMTK_DCMDATA_EXPORT DcmUnsignedLong * object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. - * -1 if either the value of the first component that does not match - * is lower in this object than in rhs, or all compared components match - * but this object has fewer components than rhs. Also returned if rhs - * cannot be casted to this object type. - * 1 if either the value of the first component that does not match - * is greater in this object than in rhs object, or all compared - * components match but the this component is longer. + * -1 if this element has fewer components than the rhs element. + * Also -1 if the value of the first component that does not match + * is lower in this object than in rhs. Also returned if rhs + * cannot be casted to this object type or both objects are of + * different VR (i.e. the DcmEVR returned by the element's ident() + * call are different). + * 1 if either this element has more components than the rhs element, or + * if the first component that does not match is greater in this object than + * in rhs object. */ virtual int compare(const DcmElement& rhs) const; @@ -202,6 +204,10 @@ class DCMTK_DCMDATA_EXPORT DcmUnsignedLong */ virtual OFCondition verify(const OFBool autocorrect = OFFalse); + /// @copydoc DcmElement::matches() + virtual OFBool matches(const DcmElement& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + protected: /** constructor. Create new element from given tag and length. diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrur.h b/dcmdata/include/dcmtk/dcmdata/dcvrur.h index c1913ade..75273792 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrur.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrur.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2014-2016, OFFIS e.V. + * Copyright (C) 2014-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -120,6 +120,14 @@ class DCMTK_DCMDATA_EXPORT DcmUniversalResourceIdentifierOrLocator virtual OFCondition getOFStringArray(OFString &stringVal, OFBool normalize = OFTrue); + // ensure inherited overloads of matches take part in overload resolution + using DcmByteString::matches; + + /// @copydoc DcmByteString::matches(OFString,OFString,OFBool) + virtual OFBool matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching = OFTrue) const; + /* --- static helper functions --- */ /** check whether given string value conforms to the VR "UR" (Universal Resource Identifier diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrus.h b/dcmdata/include/dcmtk/dcmdata/dcvrus.h index 5daebe5a..70218339 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrus.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrus.h @@ -59,13 +59,15 @@ class DCMTK_DCMDATA_EXPORT DcmUnsignedShort * object (if applicable). * @param rhs the right hand side of the comparison * @return 0 if the object values are equal. - * -1 if either the value of the first component that does not match - * is lower in this object than in rhs, or all compared components match - * but this object has fewer components than rhs. Also returned if rhs - * cannot be casted to this object type. - * 1 if either the value of the first component that does not match - * is greater in this object than in rhs object, or all compared - * components match but the this component is longer. + * -1 if this element has fewer components than the rhs element. + * Also -1 if the value of the first component that does not match + * is lower in this object than in rhs. Also returned if rhs + * cannot be casted to this object type or both objects are of + * different VR (i.e. the DcmEVR returned by the element's ident() + * call are different). + * 1 if either this element has more components than the rhs element, or + * if the first component that does not match is greater in this object than + * in rhs object. */ virtual int compare(const DcmElement& rhs) const; @@ -202,6 +204,9 @@ class DCMTK_DCMDATA_EXPORT DcmUnsignedShort */ virtual OFCondition verify(const OFBool autocorrect = OFFalse); + /// @copydoc DcmElement::matches() + virtual OFBool matches(const DcmElement& candidate, + const OFBool enableWildCardMatching = OFTrue) const; protected: /** constructor. Create new element from given tag and length. diff --git a/dcmdata/include/dcmtk/dcmdata/dcvrut.h b/dcmdata/include/dcmtk/dcmdata/dcvrut.h index 68363713..2a92423b 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcvrut.h +++ b/dcmdata/include/dcmtk/dcmdata/dcvrut.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -86,7 +86,9 @@ class DCMTK_DCMDATA_EXPORT DcmUnlimitedText */ virtual DcmEVR ident() const; - /** check whether stored value conforms to the VR and to the specified VM + /** check whether stored value conforms to the VR and to the specified VM. + * Currently, the VR checker only supports ASCII (ISO_IR 6) and Latin-1 (ISO_IR 100). + * All other specific character sets disable the check of the value representation. * @param vm parameter not used for this VR * @param oldFormat parameter not used for this VR (only for DA, TM) * @return status of the check, EC_Normal if value is correct, an error code otherwise diff --git a/dcmdata/include/dcmtk/dcmdata/dcxfer.h b/dcmdata/include/dcmtk/dcmdata/dcxfer.h index 486ea59d..232b1286 100644 --- a/dcmdata/include/dcmtk/dcmdata/dcxfer.h +++ b/dcmdata/include/dcmtk/dcmdata/dcxfer.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -118,7 +118,9 @@ typedef enum { /// HEVC/H.265 Main Profile / Level 5.1 EXS_HEVCMainProfileLevel5_1 = 39, /// HEVC/H.265 Main 10 Profile / Level 5.1 - EXS_HEVCMain10ProfileLevel5_1 = 40 + EXS_HEVCMain10ProfileLevel5_1 = 40, + /// Private GE Little Endian Implicit with big endian pixel data + EXS_PrivateGE_LEI_WithBigEndianPixelData = 41 } E_TransferSyntax; /** enumeration of byte orders @@ -202,6 +204,9 @@ public: /// return byte order for this transfer syntax inline E_ByteOrder getByteOrder() const { return byteOrder; } + /// return byte order for this transfer syntax + inline E_ByteOrder getPixelDataByteOrder() const { return pixelDataByteOrder; } + /// return name string for this transfer syntax inline const char* getXferName() const { return xferName; } @@ -303,6 +308,9 @@ private: /// transfer syntax byte order E_ByteOrder byteOrder; + /// transfer syntax byte order for pixel data + E_ByteOrder pixelDataByteOrder; + /// transfer syntax VR encoding (implicit/explicit) E_VRType vrType; diff --git a/dcmdata/libi2d/Makefile.dep b/dcmdata/libi2d/Makefile.dep index 47ac0053..963343db 100644 --- a/dcmdata/libi2d/Makefile.dep +++ b/dcmdata/libi2d/Makefile.dep @@ -19,7 +19,10 @@ i2d.o: i2d.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -37,10 +40,10 @@ i2d.o: i2d.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \ ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmdata/dcobject.h \ @@ -81,7 +84,10 @@ i2dbmps.o: i2dbmps.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -99,9 +105,9 @@ i2dbmps.o: i2dbmps.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/libi2d/i2define.h \ @@ -128,6 +134,7 @@ i2djpgs.o: i2djpgs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \ ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -141,7 +148,9 @@ i2djpgs.o: i2djpgs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -186,7 +195,10 @@ i2dplnsc.o: i2dplnsc.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -204,10 +216,10 @@ i2dplnsc.o: i2dplnsc.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \ ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmdata/dcobject.h \ @@ -240,7 +252,10 @@ i2dplsc.o: i2dplsc.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -258,10 +273,10 @@ i2dplsc.o: i2dplsc.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \ ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmdata/dcobject.h \ @@ -294,7 +309,10 @@ i2dplvlp.o: i2dplvlp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -312,10 +330,10 @@ i2dplvlp.o: i2dplvlp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \ ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmdata/dcobject.h \ diff --git a/dcmdata/libi2d/i2d.cc b/dcmdata/libi2d/i2d.cc index 137e02af..e3d963e4 100644 --- a/dcmdata/libi2d/i2d.cc +++ b/dcmdata/libi2d/i2d.cc @@ -53,6 +53,8 @@ OFCondition Image2Dcm::convert(I2DImgSource *inputPlug, return EC_IllegalParameter; OFCondition cond; + resultDset = NULL; + OFunique_ptr tempDataset; DCMDATA_LIBI2D_DEBUG("Image2Dcm: Starting conversion of file: " << inputPlug->getImageFile()); // If specified, copy DICOM template file to export file @@ -65,20 +67,19 @@ OFCondition Image2Dcm::convert(I2DImgSource *inputPlug, // remove problematic attributes from dataset cleanupTemplate(dcmff.getDataset()); // copy from input file - resultDset = new DcmDataset(*(dcmff.getDataset())); + tempDataset.reset(new DcmDataset(*(dcmff.getDataset()))); } else // otherwise, start with an empty DICOM file - resultDset = new DcmDataset(); - if (!resultDset) + tempDataset.reset(new DcmDataset()); + if (!tempDataset.get()) return EC_MemoryExhausted; // Read patient and study or series information if desired and write to export file if (m_readStudyLevel || m_readSeriesLevel) { - cond = applyStudyOrSeriesFromFile(resultDset); + cond = applyStudyOrSeriesFromFile(tempDataset.get()); if (cond.bad()) { - delete resultDset; resultDset = NULL; return cond; } } @@ -86,28 +87,26 @@ OFCondition Image2Dcm::convert(I2DImgSource *inputPlug, // Increment instance number if (m_incInstNoFromFile) { - cond = incrementInstanceNumber(resultDset); + cond = incrementInstanceNumber(tempDataset.get()); if (cond.bad()) { - delete resultDset; resultDset = NULL; return cond; } } // Insert Latin 1 as standard character set if desired if (m_insertLatin1) - cond = insertLatin1(resultDset); + cond = insertLatin1(tempDataset.get()); if (cond.bad()) return cond; // Generate and insert UIDs as necessary - generateUIDs(resultDset); + generateUIDs(tempDataset.get()); // Read and insert pixel data - cond = readAndInsertPixelData(inputPlug, resultDset, proposedTS); + cond = readAndInsertPixelData(inputPlug, tempDataset.get(), proposedTS); if (cond.bad()) { - delete resultDset; resultDset = NULL; return cond; } @@ -117,9 +116,9 @@ OFCondition Image2Dcm::convert(I2DImgSource *inputPlug, { if (srcIsLossy) { - cond = resultDset->putAndInsertOFStringArray(DCM_LossyImageCompression, "01"); + cond = tempDataset->putAndInsertOFStringArray(DCM_LossyImageCompression, "01"); if (cond.good() && !comprMethod.empty()) - cond = resultDset->putAndInsertOFStringArray(DCM_LossyImageCompressionMethod, comprMethod); + cond = tempDataset->putAndInsertOFStringArray(DCM_LossyImageCompressionMethod, comprMethod); if (cond.bad()) return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to write attribute Lossy Image Compression and/or Lossy Image Compression Method to result dataset"); } } @@ -127,29 +126,32 @@ OFCondition Image2Dcm::convert(I2DImgSource *inputPlug, DCMDATA_LIBI2D_DEBUG("Image2Dcm: No information regarding lossy compression available"); // Insert SOP Class specific attributes (and values) - cond = outPlug->convert(*resultDset); + cond = outPlug->convert(*tempDataset); if (cond.bad()) { - delete resultDset; resultDset = NULL; return cond; } // At last, apply override keys on dataset - applyOverrideKeys(resultDset); + cond = applyOverrideKeys(tempDataset.get()); + if (cond.bad()) + { + return cond; + } // Do some very basic attribute checking (e. g. existence (type 2) and values (type 1)) if (!m_disableAttribChecks) { OFString err; - err = isValid(*resultDset); - err += outPlug->isValid(*resultDset); + err = isValid(*tempDataset); + err += outPlug->isValid(*tempDataset); if (!err.empty()) { - delete resultDset; resultDset = NULL; return makeOFCondition(OFM_dcmdata, 18, OF_error, err.c_str()); } } + resultDset = tempDataset.release(); return EC_Normal; } diff --git a/dcmdata/libi2d/i2djpgs.cc b/dcmdata/libi2d/i2djpgs.cc index d90eb4ca..885cd99f 100644 --- a/dcmdata/libi2d/i2djpgs.cc +++ b/dcmdata/libi2d/i2djpgs.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2016, OFFIS e.V. + * Copyright (C) 2007-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -396,7 +396,7 @@ OFCondition I2DJpegSource::copyJPEGStream(char*& pixelData, // Only pixel data up to 2^32 bytes is supported (DICOM) and maximum size for "new" operator = size_t if ( ( OFstatic_cast(unsigned long, filesize) > OFstatic_cast(unsigned long, 4294967294UL) ) || - ( OFstatic_cast(unsigned long, filesize) > OFstatic_cast(unsigned long, OFstatic_cast(size_t, -1) ) ) ) + ( OFstatic_cast(unsigned long, filesize) > OFstatic_cast(unsigned long, -1) ) ) { DCMDATA_LIBI2D_ERROR("I2DJpegSource: JPEG file length longer than 2^32 bytes (or larger than size_t capacity), aborting"); return EC_MemoryExhausted; @@ -518,7 +518,7 @@ OFCondition I2DJpegSource::extractRawJPEGStream(char*& pixelData, // Allocate buffer for raw JPEG data // Only pixel data up to 2^32 bytes is supported (DICOM) if ( ( OFstatic_cast(unsigned long, rawStreamSize) > OFstatic_cast(unsigned long, 4294967294UL) ) || - ( OFstatic_cast(unsigned long, rawStreamSize) > OFstatic_cast(unsigned long, OFstatic_cast(size_t, -1) ) ) ) + ( OFstatic_cast(unsigned long, rawStreamSize) > OFstatic_cast(unsigned long, -1) ) ) { DCMDATA_LIBI2D_ERROR("I2DJpegSource: Raw JPEG stream length longer than 2^32 bytes (or larger than size_t capacity), aborting"); return EC_MemoryExhausted; diff --git a/dcmdata/libsrc/CMakeLists.txt b/dcmdata/libsrc/CMakeLists.txt index 9c405735..7965ebcc 100644 --- a/dcmdata/libsrc/CMakeLists.txt +++ b/dcmdata/libsrc/CMakeLists.txt @@ -1,5 +1,7 @@ # create library from source files +INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}") + DCMTK_ADD_LIBRARY(dcmdata cmdlnarg dcbytstr dcchrstr dccodec dcdatset dcdatutl dcddirif dcdicdir dcdicent dcdict dcdictbi dcdirrec dcelem dcerror dcfilefo dcfilter dchashdi dcistrma @@ -32,7 +34,7 @@ DCMTK_TARGET_LINK_MODULES(mkdictbi ofstd oflog) DCMTK_TARGET_LINK_MODULES(mkdeftag ofstd oflog) ADD_CUSTOM_TARGET(updatedeftag - COMMAND mkdeftag -o ${dcmdata_SOURCE_DIR}/include/dcmtk/dcmdata/dcdeftag.h ${DICTIONARIES} + COMMAND mkdeftag -o "${dcmdata_SOURCE_DIR}/include/dcmtk/dcmdata/dcdeftag.h" ${DICTIONARIES} DEPENDS mkdeftag WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMMENT "Generate a new include file of defined tags") diff --git a/dcmdata/libsrc/Makefile.dep b/dcmdata/libsrc/Makefile.dep index e5127219..bc6d6fdd 100644 --- a/dcmdata/libsrc/Makefile.dep +++ b/dcmdata/libsrc/Makefile.dep @@ -19,7 +19,10 @@ cmdlnarg.o: cmdlnarg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -37,10 +40,10 @@ cmdlnarg.o: cmdlnarg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h dcbytstr.o: dcbytstr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ @@ -55,6 +58,7 @@ dcbytstr.o: dcbytstr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dctagkey.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcbytstr.h \ ../include/dcmtk/dcmdata/dctypes.h \ @@ -69,7 +73,9 @@ dcbytstr.o: dcbytstr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -89,7 +95,7 @@ dcbytstr.o: dcbytstr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ - ../include/dcmtk/dcmdata/dcstack.h + ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dcmatch.h dcchrstr.o: dcchrstr.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcspchrs.h \ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \ @@ -112,6 +118,7 @@ dcchrstr.o: dcchrstr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -124,7 +131,6 @@ dcchrstr.o: dcchrstr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -146,8 +152,8 @@ dcchrstr.o: dcchrstr.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcjson.h \ - ../include/dcmtk/dcmdata/dcchrstr.h ../include/dcmtk/dcmdata/dcbytstr.h \ - ../include/dcmtk/dcmdata/dcelem.h + ../include/dcmtk/dcmdata/dcmatch.h ../include/dcmtk/dcmdata/dcchrstr.h \ + ../include/dcmtk/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dcelem.h dccodec.o: dccodec.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dccodec.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -170,7 +176,10 @@ dccodec.o: dccodec.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -188,9 +197,9 @@ dccodec.o: dccodec.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -219,6 +228,7 @@ dcdatset.o: dcdatset.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dctagkey.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcdatset.h \ ../include/dcmtk/dcmdata/dcitem.h \ @@ -235,7 +245,9 @@ dcdatset.o: dcdatset.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -284,7 +296,10 @@ dcdatutl.o: dcdatutl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -302,10 +317,10 @@ dcdatutl.o: dcdatutl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \ @@ -335,6 +350,7 @@ dcddirif.o: dcddirif.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -347,7 +363,7 @@ dcddirif.o: dcddirif.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -402,6 +418,7 @@ dcdicdir.o: dcdicdir.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -414,7 +431,7 @@ dcdicdir.o: dcdicdir.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -471,6 +488,7 @@ dcdict.o: dcdict.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdict.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../include/dcmtk/dcmdata/dchashdi.h ../include/dcmtk/dcmdata/dcdefine.h \ @@ -489,7 +507,9 @@ dcdict.o: dcdict.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -533,6 +553,7 @@ dcdirrec.o: dcdirrec.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -545,7 +566,9 @@ dcdirrec.o: dcdirrec.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -575,8 +598,6 @@ dcdirrec.o: dcdirrec.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcmetinf.h \ ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcvrulup.h ../include/dcmtk/dcmdata/dcvrul.h \ ../include/dcmtk/dcmdata/dcpixseq.h ../include/dcmtk/dcmdata/dcofsetl.h \ ../include/dcmtk/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dcvrae.h \ @@ -600,8 +621,7 @@ dcdirrec.o: dcdirrec.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrof.h ../include/dcmtk/dcmdata/dcvrod.h \ ../include/dcmtk/dcmdata/dcvrol.h ../include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmdata/dcspchrs.h \ - ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h + ../../ofstd/include/dcmtk/ofstd/ofchrenc.h dcelem.o: dcelem.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ @@ -616,6 +636,7 @@ dcelem.o: dcelem.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dctagkey.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ @@ -634,7 +655,9 @@ dcelem.o: dcelem.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -683,6 +706,7 @@ dcfilefo.o: dcfilefo.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ @@ -699,7 +723,9 @@ dcfilefo.o: dcfilefo.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -744,6 +770,7 @@ dcfilter.o: dcfilter.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ @@ -760,7 +787,9 @@ dcfilter.o: dcfilter.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -805,7 +834,10 @@ dchashdi.o: dchashdi.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -821,10 +853,10 @@ dchashdi.o: dchashdi.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h dcistrma.o: dcistrma.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcistrma.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ @@ -841,6 +873,7 @@ dcistrma.o: dcistrma.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -853,7 +886,9 @@ dcistrma.o: dcistrma.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -887,6 +922,7 @@ dcistrmb.o: dcistrmb.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -899,7 +935,9 @@ dcistrmb.o: dcistrmb.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -933,6 +971,7 @@ dcistrmf.o: dcistrmf.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -945,7 +984,9 @@ dcistrmf.o: dcistrmf.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -979,6 +1020,7 @@ dcistrmz.o: dcistrmz.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -991,7 +1033,9 @@ dcistrmz.o: dcistrmz.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1025,6 +1069,7 @@ dcitem.o: dcitem.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1037,7 +1082,9 @@ dcitem.o: dcitem.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1083,9 +1130,6 @@ dcitem.o: dcitem.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrus.h ../include/dcmtk/dcmdata/dcvrut.h \ ../include/dcmtk/dcmdata/dcspchrs.h \ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ ../include/dcmtk/dcmdata/dcjson.h dcjson.o: dcjson.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -1125,7 +1169,10 @@ dclist.o: dclist.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1142,9 +1189,9 @@ dclist.o: dclist.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h dcmatch.o: dcmatch.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -1158,6 +1205,7 @@ dcmatch.o: dcmatch.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../ofstd/include/dcmtk/ofstd/ofdiag.h \ ../include/dcmtk/dcmdata/dcmatch.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ @@ -1177,7 +1225,6 @@ dcmatch.o: dcmatch.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1196,6 +1243,7 @@ dcmatch.o: dcmatch.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dctagkey.h \ @@ -1204,7 +1252,10 @@ dcmatch.o: dcmatch.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrdt.h \ ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ ../../ofstd/include/dcmtk/ofstd/oftime.h \ - ../include/dcmtk/dcmdata/dcvrtm.h + ../include/dcmtk/dcmdata/dcvrtm.h \ + ../../ofstd/include/dcmtk/ofstd/diag/push.def \ + ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \ + ../../ofstd/include/dcmtk/ofstd/diag/pop.def dcmetinf.o: dcmetinf.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ @@ -1219,6 +1270,7 @@ dcmetinf.o: dcmetinf.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcmetinf.h ../include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../include/dcmtk/dcmdata/dctypes.h \ @@ -1233,7 +1285,9 @@ dcmetinf.o: dcmetinf.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1272,6 +1326,7 @@ dcobject.o: dcobject.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dctagkey.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -1289,7 +1344,9 @@ dcobject.o: dcobject.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1329,7 +1386,10 @@ dcostrma.o: dcostrma.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1347,9 +1407,9 @@ dcostrma.o: dcostrma.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcostrmz.h ../include/dcmtk/dcmdata/dcerror.h @@ -1375,7 +1435,10 @@ dcostrmb.o: dcostrmb.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1393,9 +1456,9 @@ dcostrmb.o: dcostrmb.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcerror.h @@ -1421,7 +1484,10 @@ dcostrmf.o: dcostrmf.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1439,9 +1505,9 @@ dcostrmf.o: dcostrmf.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcerror.h @@ -1467,7 +1533,10 @@ dcostrmz.o: dcostrmz.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1485,9 +1554,9 @@ dcostrmz.o: dcostrmz.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcerror.h @@ -1508,6 +1577,7 @@ dcpath.o: dcpath.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1520,7 +1590,9 @@ dcpath.o: dcpath.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1570,7 +1642,10 @@ dcpcache.o: dcpcache.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1586,9 +1661,9 @@ dcpcache.o: dcpcache.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dcstack.h dcpixel.o: dcpixel.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -1619,7 +1694,10 @@ dcpixel.o: dcpixel.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1636,15 +1714,16 @@ dcpixel.o: dcpixel.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ ../include/dcmtk/dcmdata/dccodec.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dclist.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcdeftag.h \ - ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dcpcache.h + ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dcpcache.h \ + ../include/dcmtk/dcmdata/dcpxitem.h dcpixseq.o: dcpixseq.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ @@ -1662,6 +1741,7 @@ dcpixseq.o: dcpixseq.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ @@ -1678,7 +1758,9 @@ dcpixseq.o: dcpixseq.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1725,7 +1807,10 @@ dcpxitem.o: dcpxitem.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1742,9 +1827,9 @@ dcpxitem.o: dcpxitem.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcswap.h \ @@ -1772,7 +1857,10 @@ dcrleccd.o: dcrleccd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1790,9 +1878,9 @@ dcrleccd.o: dcrleccd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -1829,7 +1917,10 @@ dcrlecce.o: dcrlecce.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1847,9 +1938,9 @@ dcrlecce.o: dcrlecce.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -1884,7 +1975,10 @@ dcrlecp.o: dcrlecp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1902,9 +1996,9 @@ dcrlecp.o: dcrlecp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h @@ -1931,7 +2025,10 @@ dcrledrg.o: dcrledrg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1949,9 +2046,9 @@ dcrledrg.o: dcrledrg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcrleccd.h ../include/dcmtk/dcmdata/dcrlecp.h @@ -1978,7 +2075,10 @@ dcrleerg.o: dcrleerg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1996,9 +2096,9 @@ dcrleerg.o: dcrleerg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcrlecce.h ../include/dcmtk/dcmdata/dcrlecp.h @@ -2030,7 +2130,10 @@ dcrlerp.o: dcrlerp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2047,9 +2150,9 @@ dcrlerp.o: dcrlerp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h dcsequen.o: dcsequen.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -2066,6 +2169,7 @@ dcsequen.o: dcsequen.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dctagkey.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcsequen.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ @@ -2085,7 +2189,9 @@ dcsequen.o: dcsequen.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2130,6 +2236,7 @@ dcspchrs.o: dcspchrs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -2142,7 +2249,6 @@ dcspchrs.o: dcspchrs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2197,7 +2303,10 @@ dcswap.o: dcswap.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2215,9 +2324,9 @@ dcswap.o: dcswap.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h dctag.o: dctag.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -2268,7 +2377,10 @@ dctypes.o: dctypes.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2286,10 +2398,10 @@ dctypes.o: dctypes.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h dcuid.o: dcuid.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ @@ -2312,7 +2424,10 @@ dcuid.o: dcuid.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2330,10 +2445,10 @@ dcuid.o: dcuid.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../ofstd/include/dcmtk/ofstd/ofcrc32.h \ ../../ofstd/include/dcmtk/ofstd/ofnetdb.h dcvr.o: dcvr.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -2359,7 +2474,10 @@ dcvr.o: dcvr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2376,10 +2494,10 @@ dcvr.o: dcvr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h dcvrae.o: dcvrae.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrae.h ../include/dcmtk/dcmdata/dcbytstr.h \ ../include/dcmtk/dcmdata/dctypes.h \ @@ -2401,7 +2519,10 @@ dcvrae.o: dcvrae.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2419,16 +2540,17 @@ dcvrae.o: dcvrae.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ - ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h + ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ + ../include/dcmtk/dcmdata/dcmatch.h dcvras.o: dcvras.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvras.h ../include/dcmtk/dcmdata/dcbytstr.h \ ../include/dcmtk/dcmdata/dctypes.h \ @@ -2450,7 +2572,10 @@ dcvras.o: dcvras.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2468,10 +2593,10 @@ dcvras.o: dcvras.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -2505,7 +2630,10 @@ dcvrat.o: dcvrat.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2522,9 +2650,9 @@ dcvrat.o: dcvrat.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ ../include/dcmtk/dcmdata/dcjson.h @@ -2549,7 +2677,10 @@ dcvrcs.o: dcvrcs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2567,16 +2698,17 @@ dcvrcs.o: dcvrcs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ - ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h + ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ + ../include/dcmtk/dcmdata/dcmatch.h dcvrda.o: dcvrda.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrda.h ../include/dcmtk/dcmdata/dcbytstr.h \ ../include/dcmtk/dcmdata/dctypes.h \ @@ -2598,7 +2730,10 @@ dcvrda.o: dcvrda.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2616,17 +2751,20 @@ dcvrda.o: dcvrda.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ - ../../ofstd/include/dcmtk/ofstd/ofdate.h + ../../ofstd/include/dcmtk/ofstd/ofdate.h \ + ../include/dcmtk/dcmdata/dcvrtm.h \ + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmdata/dcmatch.h dcvrds.o: dcvrds.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvrds.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ @@ -2648,7 +2786,10 @@ dcvrds.o: dcvrds.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2666,10 +2807,10 @@ dcvrds.o: dcvrds.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -2698,7 +2839,10 @@ dcvrdt.o: dcvrdt.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2716,10 +2860,10 @@ dcvrdt.o: dcvrdt.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -2729,7 +2873,8 @@ dcvrdt.o: dcvrdt.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ ../../ofstd/include/dcmtk/ofstd/ofdate.h \ ../../ofstd/include/dcmtk/ofstd/oftime.h \ - ../include/dcmtk/dcmdata/dcvrda.h ../include/dcmtk/dcmdata/dcvrtm.h + ../include/dcmtk/dcmdata/dcvrda.h ../include/dcmtk/dcmdata/dcvrtm.h \ + ../include/dcmtk/dcmdata/dcmatch.h dcvrfd.o: dcvrfd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ @@ -2744,6 +2889,7 @@ dcvrfd.o: dcvrfd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvrfd.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -2761,7 +2907,9 @@ dcvrfd.o: dcvrfd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2792,6 +2940,7 @@ dcvrfl.o: dcvrfl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvrfl.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -2809,7 +2958,9 @@ dcvrfl.o: dcvrfl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2847,7 +2998,10 @@ dcvris.o: dcvris.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2865,10 +3019,10 @@ dcvris.o: dcvris.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -2899,7 +3053,10 @@ dcvrlo.o: dcvrlo.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2917,10 +3074,10 @@ dcvrlo.o: dcvrlo.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ @@ -2947,7 +3104,10 @@ dcvrlt.o: dcvrlt.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2965,10 +3125,10 @@ dcvrlt.o: dcvrlt.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -2989,6 +3149,7 @@ dcvrobow.o: dcvrobow.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../ofstd/include/dcmtk/ofstd/ofuuid.h \ ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dctagkey.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvrobow.h \ @@ -3008,7 +3169,9 @@ dcvrobow.o: dcvrobow.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3054,7 +3217,10 @@ dcvrod.o: dcvrod.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3071,9 +3237,9 @@ dcvrod.o: dcvrod.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ ../include/dcmtk/dcmdata/dcswap.h ../include/dcmtk/dcmdata/dcjson.h @@ -3106,7 +3272,10 @@ dcvrof.o: dcvrof.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3123,9 +3292,9 @@ dcvrof.o: dcvrof.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dcswap.h dcvrol.o: dcvrol.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -3156,7 +3325,10 @@ dcvrol.o: dcvrol.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3173,9 +3345,9 @@ dcvrol.o: dcvrol.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ ../include/dcmtk/dcmdata/dcjson.h ../include/dcmtk/dcmdata/dcswap.h @@ -3202,7 +3374,10 @@ dcvrpn.o: dcvrpn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3220,10 +3395,10 @@ dcvrpn.o: dcvrpn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ @@ -3256,7 +3431,10 @@ dcvrpobw.o: dcvrpobw.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3273,9 +3451,9 @@ dcvrpobw.o: dcvrpobw.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h dcvrsh.o: dcvrsh.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -3299,7 +3477,10 @@ dcvrsh.o: dcvrsh.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3317,10 +3498,10 @@ dcvrsh.o: dcvrsh.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -3355,7 +3536,10 @@ dcvrsl.o: dcvrsl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3372,9 +3556,9 @@ dcvrsl.o: dcvrsl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h dcvrss.o: dcvrss.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -3404,7 +3588,10 @@ dcvrss.o: dcvrss.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3421,9 +3608,9 @@ dcvrss.o: dcvrss.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h dcvrst.o: dcvrst.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -3447,7 +3634,10 @@ dcvrst.o: dcvrst.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3465,10 +3655,10 @@ dcvrst.o: dcvrst.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -3495,7 +3685,10 @@ dcvrtm.o: dcvrtm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3513,17 +3706,18 @@ dcvrtm.o: dcvrtm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcbytstr.h \ ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ - ../../ofstd/include/dcmtk/ofstd/oftime.h + ../../ofstd/include/dcmtk/ofstd/oftime.h \ + ../include/dcmtk/dcmdata/dcmatch.h dcvruc.o: dcvruc.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvruc.h ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -3544,7 +3738,10 @@ dcvruc.o: dcvruc.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3562,10 +3759,10 @@ dcvruc.o: dcvruc.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcchrstr.h \ ../include/dcmtk/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ @@ -3587,6 +3784,7 @@ dcvrui.o: dcvrui.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvrui.h ../include/dcmtk/dcmdata/dcbytstr.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -3600,7 +3798,9 @@ dcvrui.o: dcvrui.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3650,7 +3850,10 @@ dcvrul.o: dcvrul.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3667,9 +3870,9 @@ dcvrul.o: dcvrul.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h dcvrulup.o: dcvrulup.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -3699,7 +3902,10 @@ dcvrulup.o: dcvrulup.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3716,9 +3922,9 @@ dcvrulup.o: dcvrulup.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h dcvrur.o: dcvrur.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -3741,7 +3947,10 @@ dcvrur.o: dcvrur.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3759,16 +3968,17 @@ dcvrur.o: dcvrur.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcbytstr.h \ ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ - ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h + ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ + ../include/dcmtk/dcmdata/dcmatch.h dcvrus.o: dcvrus.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../include/dcmtk/dcmdata/dcvrus.h ../include/dcmtk/dcmdata/dcelem.h \ @@ -3796,7 +4006,10 @@ dcvrus.o: dcvrus.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3813,9 +4026,9 @@ dcvrus.o: dcvrus.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h dcvrut.o: dcvrut.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -3838,7 +4051,10 @@ dcvrut.o: dcvrut.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3856,10 +4072,10 @@ dcvrut.o: dcvrut.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcchrstr.h \ ../include/dcmtk/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dcelem.h \ ../include/dcmtk/dcmdata/dcobject.h \ @@ -3884,6 +4100,7 @@ dcwcache.o: dcwcache.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcistrma.h ../include/dcmtk/dcmdata/dcxfer.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -3897,7 +4114,9 @@ dcwcache.o: dcwcache.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3938,7 +4157,10 @@ dcxfer.o: dcxfer.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -3956,10 +4178,10 @@ dcxfer.o: dcxfer.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcuid.h @@ -3984,6 +4206,7 @@ mkdeftag.o: mkdeftag.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdicent.h ../include/dcmtk/dcmdata/dctagkey.h \ ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h @@ -4008,6 +4231,7 @@ mkdictbi.o: mkdictbi.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcdicent.h ../include/dcmtk/dcmdata/dctagkey.h \ ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h @@ -4028,6 +4252,7 @@ vrscan.o: vrscan.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -4040,7 +4265,9 @@ vrscan.o: vrscan.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ diff --git a/dcmdata/libsrc/cmdlnarg.cc b/dcmdata/libsrc/cmdlnarg.cc index 1580391b..6673a16c 100644 --- a/dcmdata/libsrc/cmdlnarg.cc +++ b/dcmdata/libsrc/cmdlnarg.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2012, OFFIS e.V. + * Copyright (C) 1996-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -113,17 +113,11 @@ void prepareCmdLineArgs(int& /* argc */, char** /* argv */, int fderr = dup(fileno(stdout)); if (fderr != fileno(stderr)) { - char buf[256]; DCMDATA_ERROR("INTERNAL ERROR: cannot map stderr to stdout: " - << OFStandard::strerror(errno, buf, sizeof(buf))); + << OFStandard::getLastSystemErrorCode().message()); } } -#ifndef NO_IOS_BASE_ASSIGN - /* make cout refer to cerr. This does not work with all iostream implementations :-( */ - cout = cerr; -#endif - /* make stdout the same as stderr */ *stdout = *stderr; @@ -136,15 +130,13 @@ void prepareCmdLineArgs(int& /* argc */, char** /* argv */, /* make sure the buffering is removed */ if (setvbuf(stdout, NULL, _IONBF, 0 ) != 0 ) { - char buf[256]; DCMDATA_ERROR("INTERNAL ERROR: cannot unbuffer stdout: " - << OFStandard::strerror(errno, buf, sizeof(buf))); + << OFStandard::getLastSystemErrorCode().message()); } if (setvbuf(stderr, NULL, _IONBF, 0 ) != 0 ) { - char buf[256]; DCMDATA_ERROR("INTERNAL ERROR: cannot unbuffer stderr: " - << OFStandard::strerror(errno, buf, sizeof(buf))); + << OFStandard::getLastSystemErrorCode().message()); } #endif /* __BORLANDC__ */ #endif diff --git a/dcmdata/libsrc/dcbytstr.cc b/dcmdata/libsrc/dcbytstr.cc index 794d4b66..4d58c9a8 100644 --- a/dcmdata/libsrc/dcbytstr.cc +++ b/dcmdata/libsrc/dcbytstr.cc @@ -27,6 +27,7 @@ #include "dcmtk/dcmdata/dcjson.h" #include "dcmtk/dcmdata/dcbytstr.h" #include "dcmtk/dcmdata/dcvr.h" +#include "dcmtk/dcmdata/dcmatch.h" #define INCLUDE_CSTDLIB #define INCLUDE_CSTDIO @@ -152,8 +153,19 @@ int DcmByteString::compare(const DcmElement& rhs) const myThis = OFconst_cast(DcmByteString*, this); myRhs = OFstatic_cast(DcmByteString*, OFconst_cast(DcmElement*, &rhs)); - /* iterate over all components and test equality */ + /* check number of components. */ + unsigned long rhsVM = myRhs->getVM(); unsigned long thisVM = myThis->getVM(); + if (thisVM < rhsVM) + { + return -1; + } + else if (thisVM > rhsVM) + { + return 1; + } + + /* iterate over all components and test equality */ for (unsigned long count = 0; count < thisVM; count++) { OFString val; @@ -168,25 +180,9 @@ int DcmByteString::compare(const DcmElement& rhs) const return result; } } - else - { - break; // values equal until this point (rhs shorter) - } } } - - /* we get here if all values are equal. Now look at the number of components. */ - unsigned long rhsVM = myRhs->getVM(); - if (thisVM < rhsVM) - { - return -1; - } - else if (thisVM > rhsVM) - { - return 1; - } - - /* all values as well as VM equal: objects are equal */ + /* all values equal */ return 0; } @@ -944,3 +940,32 @@ OFCondition DcmByteString::writeJson(STD_NAMESPACE ostream &out, /* always report success */ return EC_Normal; } + + +OFBool DcmByteString::matches(const DcmElement& candidate, + const OFBool enableWildCardMatching) const +{ + if (ident() == candidate.ident()) + { + // some const casts to call the getter functions, I do not modify the values, I promise! + DcmByteString& key = OFconst_cast(DcmByteString&,*this); + DcmElement& can = OFconst_cast(DcmElement&,candidate); + OFString a, b; + for (unsigned long ui = 0; ui < key.getVM(); ++ui) + for (unsigned long uj = 0; uj < can.getVM(); ++uj) + if( key.getOFString( a, ui, OFTrue ).good() && can.getOFString( b, uj, OFTrue ).good() && matches( a, b, enableWildCardMatching ) ) + return OFTrue; + return key.getVM() == 0; + } + return OFFalse; +} + + +OFBool DcmByteString::matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching) const +{ + OFstatic_cast(void,enableWildCardMatching); + // Universal Matching || Single Value Matching + return key.empty() || key == candidate; +} diff --git a/dcmdata/libsrc/dcchrstr.cc b/dcmdata/libsrc/dcchrstr.cc index 3f4d1585..28c34e98 100644 --- a/dcmdata/libsrc/dcchrstr.cc +++ b/dcmdata/libsrc/dcchrstr.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,6 +26,7 @@ #include "dcmtk/dcmdata/dcitem.h" /* for class DcmItem */ #include "dcmtk/dcmdata/dcdeftag.h" /* for tag definitions */ #include "dcmtk/dcmdata/dcjson.h" /* json helper classes */ +#include "dcmtk/dcmdata/dcmatch.h" // // This implementation does not support 16 bit character sets. Since 8 bit @@ -267,3 +268,14 @@ const OFString& DcmCharString::getDelimiterChars() const { return DcmVR(EVR_UN).getDelimiterChars(); } + + +OFBool DcmCharString::matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching) const +{ + if (enableWildCardMatching) + return DcmAttributeMatching::wildCardMatching(key.c_str(), key.length(), candidate.c_str(), candidate.length()); + else + return DcmByteString::matches(key, candidate, OFFalse); +} diff --git a/dcmdata/libsrc/dcdatset.cc b/dcmdata/libsrc/dcdatset.cc index 61f4bc16..e5bb8ac0 100644 --- a/dcmdata/libsrc/dcdatset.cc +++ b/dcmdata/libsrc/dcdatset.cc @@ -368,6 +368,15 @@ OFCondition DcmDataset::read(DcmInputStream &inStream, const E_TransferSyntax xfer, const E_GrpLenEncoding glenc, const Uint32 maxReadLength) +{ + return DcmDataset::readUntilTag(inStream, xfer, glenc, maxReadLength, DCM_UndefinedTagKey); +} + +OFCondition DcmDataset::readUntilTag(DcmInputStream &inStream, + const E_TransferSyntax xfer, + const E_GrpLenEncoding glenc, + const Uint32 maxReadLength, + const DcmTagKey &stopParsingAtElement) { /* check if the stream variable reported an error */ errorFlag = inStream.status(); @@ -442,7 +451,7 @@ OFCondition DcmDataset::read(DcmInputStream &inStream, } /* pass processing the task to class DcmItem */ if (errorFlag.good()) - errorFlag = DcmItem::read(inStream, OriginalXfer, glenc, maxReadLength); + errorFlag = DcmItem::readUntilTag(inStream, OriginalXfer, glenc, maxReadLength, stopParsingAtElement); } @@ -638,6 +647,15 @@ OFCondition DcmDataset::loadFile(const OFFilename &fileName, const E_TransferSyntax readXfer, const E_GrpLenEncoding groupLength, const Uint32 maxReadLength) +{ + return DcmDataset::loadFileUntilTag(fileName, readXfer, groupLength, maxReadLength, DCM_UndefinedTagKey); +} + +OFCondition DcmDataset::loadFileUntilTag(const OFFilename &fileName, + const E_TransferSyntax readXfer, + const E_GrpLenEncoding groupLength, + const Uint32 maxReadLength, + const DcmTagKey &stopParsingAtElement) { OFCondition l_error = EC_InvalidFilename; /* check parameters first */ @@ -657,7 +675,7 @@ OFCondition DcmDataset::loadFile(const OFFilename &fileName, { /* read data from file */ transferInit(); - l_error = read(fileStream, readXfer, groupLength, maxReadLength); + l_error = readUntilTag(fileStream, readXfer, groupLength, maxReadLength, stopParsingAtElement); transferEnd(); } } diff --git a/dcmdata/libsrc/dcddirif.cc b/dcmdata/libsrc/dcddirif.cc index ca118d7a..e25c0e7a 100644 --- a/dcmdata/libsrc/dcddirif.cc +++ b/dcmdata/libsrc/dcddirif.cc @@ -24,7 +24,6 @@ #define INCLUDE_CSTDIO #define INCLUDE_CCTYPE -#define INCLUDE_CERRNO #include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/dcmdata/dcddirif.h" @@ -668,7 +667,8 @@ static E_DirRecType sopClassToRecordType(const OFString &sopClass) compare(sopClass, UID_MacularGridThicknessAndVolumeReportStorage) || compare(sopClass, UID_ImplantationPlanSRDocumentStorage) || compare(sopClass, UID_AcquisitionContextSRStorage) || - compare(sopClass, UID_SimplifiedAdultEchoSRStorage)) + compare(sopClass, UID_SimplifiedAdultEchoSRStorage) || + compare(sopClass, UID_PatientRadiationDoseSRStorage)) { result = ERT_SRDocument; } @@ -679,6 +679,10 @@ static E_DirRecType sopClassToRecordType(const OFString &sopClass) compare(sopClass, UID_XAXRFGrayscaleSoftcopyPresentationStateStorage) || compare(sopClass, UID_GrayscalePlanarMPRVolumetricPresentationStateStorage) || compare(sopClass, UID_CompositingPlanarMPRVolumetricPresentationStateStorage) || + compare(sopClass, UID_AdvancedBlendingPresentationStateStorage) || + compare(sopClass, UID_VolumeRenderingVolumetricPresentationStateStorage) || + compare(sopClass, UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage) || + compare(sopClass, UID_MultipleVolumeRenderingVolumetricPresentationStateStorage) || compare(sopClass, UID_BasicStructuredDisplayStorage)) { result = ERT_Presentation; @@ -1049,6 +1053,7 @@ static OFBool isMultiframeStorageSOPClass(const OFString &sopClassUID) compare(sopClassUID, UID_MultiframeSingleBitSecondaryCaptureImageStorage) || compare(sopClassUID, UID_MultiframeTrueColorSecondaryCaptureImageStorage) || compare(sopClassUID, UID_NuclearMedicineImageStorage) || + compare(sopClassUID, UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage) || compare(sopClassUID, UID_OphthalmicPhotography16BitImageStorage) || compare(sopClassUID, UID_OphthalmicPhotography8BitImageStorage) || compare(sopClassUID, UID_OphthalmicTomographyImageStorage) || @@ -1569,7 +1574,8 @@ OFCondition DicomDirInterface::checkSOPClassAndXfer(DcmMetaInfo *metainfo, compare(mediaSOPClassUID, UID_MacularGridThicknessAndVolumeReportStorage) || compare(mediaSOPClassUID, UID_ImplantationPlanSRDocumentStorage) || compare(mediaSOPClassUID, UID_AcquisitionContextSRStorage) || - compare(mediaSOPClassUID, UID_SimplifiedAdultEchoSRStorage); + compare(mediaSOPClassUID, UID_SimplifiedAdultEchoSRStorage) || + compare(mediaSOPClassUID, UID_PatientRadiationDoseSRStorage); } /* is it one of the waveform SOP Classes? */ if (!found) @@ -1594,6 +1600,10 @@ OFCondition DicomDirInterface::checkSOPClassAndXfer(DcmMetaInfo *metainfo, compare(mediaSOPClassUID, UID_XAXRFGrayscaleSoftcopyPresentationStateStorage) || compare(mediaSOPClassUID, UID_GrayscalePlanarMPRVolumetricPresentationStateStorage) || compare(mediaSOPClassUID, UID_CompositingPlanarMPRVolumetricPresentationStateStorage) || + compare(mediaSOPClassUID, UID_AdvancedBlendingPresentationStateStorage) || + compare(mediaSOPClassUID, UID_VolumeRenderingVolumetricPresentationStateStorage) || + compare(mediaSOPClassUID, UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage) || + compare(mediaSOPClassUID, UID_MultipleVolumeRenderingVolumetricPresentationStateStorage) || compare(mediaSOPClassUID, UID_BasicStructuredDisplayStorage); } /* is it one of the encapsulated document SOP Classes? */ @@ -5308,9 +5318,8 @@ OFBool DicomDirInterface::copyFile(const OFFilename &fromFilename, if (!result) { /* create error message from error code */ - char buffer[255]; DCMDATA_ERROR("copying files: " << fromFilename << " to " << toFilename - << ": " << OFStandard::strerror(errno, buffer, 255)); + << ": " << OFStandard::getLastSystemErrorCode().message()); } return result; } diff --git a/dcmdata/libsrc/dcdicdir.cc b/dcmdata/libsrc/dcdicdir.cc index ec1dc389..e0865537 100644 --- a/dcmdata/libsrc/dcdicdir.cc +++ b/dcmdata/libsrc/dcdicdir.cc @@ -24,7 +24,6 @@ #define INCLUDE_CSTDLIB #define INCLUDE_CSTDIO -#define INCLUDE_CERRNO #define INCLUDE_LIBC #define INCLUDE_UNISTD #include "dcmtk/ofstd/ofstdinc.h" @@ -1069,29 +1068,23 @@ OFCondition DcmDicomDir::write(const E_TransferSyntax oxfer, { if (!OFStandard::renameFile(dicomDirFileName, backupFilename)) { - char buf[256]; - const char *text = OFStandard::strerror(errno, buf, sizeof(buf)); - if (text == NULL) text = "(unknown error code)"; - errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, text); + OFString buffer = OFStandard::getLastSystemErrorCode().message(); + errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, buffer.c_str()); } } #else if (!OFStandard::deleteFile(dicomDirFileName)) { - char buf[256]; - const char *text = OFStandard::strerror(errno, buf, sizeof(buf)); - if (text == NULL) text = "(unknown error code)"; - errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, text); + OFString buffer = OFStandard::getLastSystemErrorCode().message(); + errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, buffer.c_str()); } #endif } if (errorFlag == EC_Normal && !OFStandard::renameFile(tempFilename, dicomDirFileName)) { - char buf[256]; - const char *text = OFStandard::strerror(errno, buf, sizeof(buf)); - if (text == NULL) text = "(unknown error code)"; - errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, text); + OFString buffer = OFStandard::getLastSystemErrorCode().message(); + errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, buffer.c_str()); } modified = OFFalse; diff --git a/dcmdata/libsrc/dcdictbi.cc b/dcmdata/libsrc/dcdictbi.cc index 2e091454..ec01c789 100644 --- a/dcmdata/libsrc/dcdictbi.cc +++ b/dcmdata/libsrc/dcdictbi.cc @@ -4,7 +4,7 @@ ** ** User: joergr ** Host: thinkpad -** Date: 2017-01-31 14:11:02 +** Date: 2017-06-15 10:51:06 ** Prog: /home/joergr/Source/dcmtk-full/public/dcmdata/libsrc/mkdictbi ** ** From: ../data/dicom.dic @@ -2123,23 +2123,23 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0010, 0x0221, 0x0010, 0x0221, - EVR_SQ, "GeneticModificationsSequence", 1, 1, "DICOM/CP_1619", + EVR_SQ, "GeneticModificationsSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0010, 0x0222, 0x0010, 0x0222, - EVR_UC, "GeneticModificationsDescription", 1, 1, "DICOM/CP_1619", + EVR_UC, "GeneticModificationsDescription", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0010, 0x0223, 0x0010, 0x0223, - EVR_LO, "GeneticModificationsNomenclature", 1, 1, "DICOM/CP_1619", + EVR_LO, "GeneticModificationsNomenclature", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0010, 0x0229, 0x0010, 0x0229, - EVR_SQ, "GeneticModificationsCodeSequence", 1, 1, "DICOM/CP_1619", + EVR_SQ, "GeneticModificationsCodeSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0010, 0x1000, 0x0010, 0x1000, - EVR_LO, "OtherPatientIDs", 1, -1, "DICOM", + EVR_LO, "RETIRED_OtherPatientIDs", 1, -1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0010, 0x1001, 0x0010, 0x1001, @@ -2203,7 +2203,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0010, 0x1090, 0x0010, 0x1090, - EVR_LO, "MedicalRecordLocator", 1, 1, "DICOM", + EVR_LO, "RETIRED_MedicalRecordLocator", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0010, 0x1100, 0x0010, 0x1100, @@ -13404,6 +13404,82 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_OF, "TwoDimensionalToThreeDimensionalMapData", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0022, 0x1612, 0x0022, 0x1612, + EVR_SQ, "DerivationAlgorithmSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1615, 0x0022, 0x1615, + EVR_SQ, "OphthalmicImageTypeCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1616, 0x0022, 0x1616, + EVR_LO, "OphthalmicImageTypeDescription", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1618, 0x0022, 0x1618, + EVR_SQ, "ScanPatternTypeCodeSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1620, 0x0022, 0x1620, + EVR_SQ, "ReferencedSurfaceMeshIdentificationSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1622, 0x0022, 0x1622, + EVR_CS, "OphthalmicVolumetricPropertiesFlag", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1624, 0x0022, 0x1624, + EVR_FL, "OphthalmicAnatomicReferencePointXCoordinate", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1626, 0x0022, 0x1626, + EVR_FL, "OphthalmicAnatomicReferencePointYCoordinate", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1628, 0x0022, 0x1628, + EVR_SQ, "OphthalmicEnFaceImageQualityRatingSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1630, 0x0022, 0x1630, + EVR_DS, "QualityThreshold", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1640, 0x0022, 0x1640, + EVR_SQ, "OCTBscanAnalysisAcquisitionParametersSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1642, 0x0022, 0x1642, + EVR_UL, "NumberofBscansPerFrame", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1643, 0x0022, 0x1643, + EVR_FL, "BscanSlabThickness", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1644, 0x0022, 0x1644, + EVR_FL, "DistanceBetweenBscanSlabs", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1645, 0x0022, 0x1645, + EVR_FL, "BscanCycleTime", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1646, 0x0022, 0x1646, + EVR_FL, "BscanCycleTimeVector", 1, -1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1649, 0x0022, 0x1649, + EVR_FL, "AscanRate", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1650, 0x0022, 0x1650, + EVR_FL, "BscanRate", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0022, 0x1658, 0x0022, 0x1658, + EVR_UL, "SurfaceMeshZPixelOffset", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } #ifdef ENABLE_PRIVATE_TAGS , { 0x0023, 0x0000, 0x0023, 0x0000, EVR_DS, "CRDRE", 1, 1, "PrivateTag", @@ -18426,6 +18502,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_DS, "EntranceDoseInmGy", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0040, 0x8303, 0x0040, 0x8303, + EVR_CS, "EntranceDoseDerivation", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0040, 0x9092, 0x0040, 0x9092, EVR_SQ, "ParametricMapFrameTypeSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -21519,7 +21599,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0068, 0x62f0, 0x0068, 0x62f0, - EVR_FD, "ViewOrientationModifier", 9, 9, "DICOM", + EVR_SQ, "ViewOrientationModifierCodeSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0068, 0x62f2, 0x0068, 0x62f2, @@ -22195,7 +22275,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0070, 0x1206, 0x0070, 0x1206, - EVR_CS, "CompositingMethod", 1, 1, "DICOM", + EVR_CS, "RETIRED_CompositingMethod", 1, 1, "DICOM/retired", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0070, 0x1207, 0x0070, 0x1207, @@ -22206,6 +22286,26 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_CS, "ImageVolumeGeometry", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0070, 0x1209, 0x0070, 0x1209, + EVR_UI, "VolumetricPresentationInputSetUID", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x120a, 0x0070, 0x120a, + EVR_SQ, "VolumetricPresentationInputSetSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x120b, 0x0070, 0x120b, + EVR_CS, "GlobalCrop", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x120c, 0x0070, 0x120c, + EVR_US, "GlobalCroppingSpecificationIndex", 1, -1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x120d, 0x0070, 0x120d, + EVR_CS, "RenderingMethod", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0070, 0x1301, 0x0070, 0x1301, EVR_SQ, "VolumeCroppingSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -22274,6 +22374,54 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_FD, "MPRViewHeight", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0070, 0x1602, 0x0070, 0x1602, + EVR_CS, "RenderProjection", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1603, 0x0070, 0x1603, + EVR_FD, "ViewpointPosition", 3, 3, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1604, 0x0070, 0x1604, + EVR_FD, "ViewpointLookAtPoint", 3, 3, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1605, 0x0070, 0x1605, + EVR_FD, "ViewpointUpDirection", 3, 3, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1606, 0x0070, 0x1606, + EVR_FD, "RenderFieldOfView", 6, 6, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1607, 0x0070, 0x1607, + EVR_FD, "SamplingStepSize", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1701, 0x0070, 0x1701, + EVR_CS, "ShadingStyle", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1702, 0x0070, 0x1702, + EVR_FD, "AmbientReflectionIntensity", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1703, 0x0070, 0x1703, + EVR_FD, "LightDirection", 3, 3, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1704, 0x0070, 0x1704, + EVR_FD, "DiffuseReflectionIntensity", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1705, 0x0070, 0x1705, + EVR_FD, "SpecularReflectionIntensity", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1706, 0x0070, 0x1706, + EVR_FD, "Shininess", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0070, 0x1801, 0x0070, 0x1801, EVR_SQ, "PresentationStateClassificationComponentSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -22342,6 +22490,66 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_FD, "AnimationStepSize", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x0070, 0x1a06, 0x0070, 0x1a06, + EVR_FD, "SwivelRange", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1a07, 0x0070, 0x1a07, + EVR_OD, "VolumetricCurveUpDirections", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1a08, 0x0070, 0x1a08, + EVR_SQ, "VolumeStreamSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1a09, 0x0070, 0x1a09, + EVR_LO, "RGBATransferFunctionDescription", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1b01, 0x0070, 0x1b01, + EVR_SQ, "AdvancedBlendingSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1b02, 0x0070, 0x1b02, + EVR_US, "BlendingInputNumber", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1b03, 0x0070, 0x1b03, + EVR_SQ, "BlendingDisplayInputSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1b04, 0x0070, 0x1b04, + EVR_SQ, "BlendingDisplaySequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1b06, 0x0070, 0x1b06, + EVR_CS, "BlendingMode", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1b07, 0x0070, 0x1b07, + EVR_CS, "TimeSeriesBlending", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1b08, 0x0070, 0x1b08, + EVR_CS, "GeometryForDisplay", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1b11, 0x0070, 0x1b11, + EVR_SQ, "ThresholdSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1b12, 0x0070, 0x1b12, + EVR_SQ, "ThresholdValueSequence", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1b13, 0x0070, 0x1b13, + EVR_CS, "ThresholdType", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } + , { 0x0070, 0x1b14, 0x0070, 0x1b14, + EVR_FD, "ThresholdValue", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x0072, 0x0002, 0x0072, 0x0002, EVR_SH, "HangingProtocolName", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, @@ -23163,7 +23371,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0076, 0x0034, 0x0076, 0x0034, - EVR_CS, "ComponentTypeCodeSequence", 1, 1, "DICOM", + EVR_SQ, "ComponentTypeCodeSequence", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } , { 0x0076, 0x0036, 0x0076, 0x0036, @@ -25736,6 +25944,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = { EVR_DS, "BeamDoseSpecificationPoint", 3, 3, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, NULL } + , { 0x300a, 0x0083, 0x300a, 0x0083, + EVR_UI, "ReferencedDoseReferenceUID", 1, 1, "DICOM", + DcmDictRange_Unspecified, DcmDictRange_Unspecified, + NULL } , { 0x300a, 0x0084, 0x300a, 0x0084, EVR_DS, "BeamDose", 1, 1, "DICOM", DcmDictRange_Unspecified, DcmDictRange_Unspecified, diff --git a/dcmdata/libsrc/dcdirrec.cc b/dcmdata/libsrc/dcdirrec.cc index fb9cc0c0..bd5a9017 100644 --- a/dcmdata/libsrc/dcdirrec.cc +++ b/dcmdata/libsrc/dcdirrec.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,7 +25,6 @@ #define INCLUDE_CSTDLIB #define INCLUDE_CSTDIO #define INCLUDE_CSTRING -#define INCLUDE_CERRNO #define INCLUDE_CCTYPE #define INCLUDE_LIBC #define INCLUDE_UNISTD @@ -1092,10 +1091,8 @@ OFCondition DcmDirectoryRecord::purgeReferencedFile() { // filename exists if (unlink(localFileName) != 0) { - char buf[256]; - const char *text = OFStandard::strerror(errno, buf, sizeof(buf)); - if (text == NULL) text = "(unknown error code)"; - errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, text); + OFString buffer = OFStandard::getLastSystemErrorCode().message(); + errorFlag = makeOFCondition(OFM_dcmdata, 19, OF_error, buffer.c_str()); } delete[] localFileName; } else { // no referenced file exists diff --git a/dcmdata/libsrc/dcelem.cc b/dcmdata/libsrc/dcelem.cc index a682403e..840e6aae 100644 --- a/dcmdata/libsrc/dcelem.cc +++ b/dcmdata/libsrc/dcelem.cc @@ -306,13 +306,35 @@ Uint32 DcmElement::calcElementLength(const E_TransferSyntax xfer, { DcmXfer xferSyn(xfer); DcmEVR vr = getVR(); - /* These don't use extended length encoding, but when writing, they are - * converted to EVR_UN which does use extended length encoding. - * (EVR_na should never happen here, it's just handled for completeness) */ + + /* These VRs don't use extended length encoding, but when writing, they are + * converted to EVR_UN, which DOES use extended length encoding. + * (EVR_na should never happen here, it's just handled for completeness) + */ if (vr == EVR_UNKNOWN2B || vr == EVR_na) vr = EVR_UN; - const Uint32 headerLength = xferSyn.sizeofTagHeader(vr); + + /* compute length of element value */ const Uint32 elemLength = getLength(xfer, enctype); + + /* Create an object that represents this object's "valid" data type */ + DcmVR myvalidvr(vr); + + if ((elemLength) > 0xffff && (! myvalidvr.usesExtendedLengthEncoding()) && xferSyn.isExplicitVR()) + { + /* special case: we are writing in explicit VR, the VR of this + * element uses a 2-byte length encoding, but the element length is + * too large for a 2-byte length field. We need to write this element + * as VR=UN (or VR=OB) and adjust the length calculation accordingly. + * Since UN and OB always have the same header length, we can simply + * assume that we are using UN. + */ + vr = EVR_UN; + } + + /* now compute length of header */ + const Uint32 headerLength = xferSyn.sizeofTagHeader(vr); + if (OFStandard::check32BitAddOverflow(headerLength, elemLength)) return DCM_UndefinedLength; else @@ -323,22 +345,7 @@ Uint32 DcmElement::calcElementLength(const E_TransferSyntax xfer, OFBool DcmElement::canWriteXfer(const E_TransferSyntax newXfer, const E_TransferSyntax /*oldXfer*/) { - OFBool canWrite = (newXfer != EXS_Unknown); - if (canWrite) - { - /* check whether element value exceeds length field (in case of 16 bit) */ - if (DcmXfer(newXfer).isExplicitVR() && !DcmVR(getVR()).usesExtendedLengthEncoding()) - { - const Uint32 length = getLength(newXfer); - if (length > 0xffff) - { - DCMDATA_DEBUG("DcmElement::canWriteXfer() Length of element " << getTagName() << " " << getTag() - << " exceeds maximum of 16-bit length field (" << length << " > 65535 bytes)"); - canWrite = OFFalse; - } - } - } - return canWrite; + return (newXfer != EXS_Unknown); } @@ -1119,8 +1126,12 @@ OFCondition DcmElement::read(DcmInputStream &inStream, /* if this is not an illegal call, go ahead and create a DcmXfer */ /* object based on the transfer syntax which was passed */ DcmXfer inXfer(ixfer); + /* determine the transfer syntax's byte ordering */ - fByteOrder = inXfer.getByteOrder(); + if (getTag() == DCM_PixelData) + fByteOrder = inXfer.getPixelDataByteOrder(); + else fByteOrder = inXfer.getByteOrder(); + /* check if the stream reported an error */ errorFlag = inStream.status(); /* if we encountered the end of the stream, set the error flag correspondingly */ @@ -1169,7 +1180,7 @@ OFCondition DcmElement::read(DcmInputStream &inStream, if (fLoadValue) { offile_off_t skipped = inStream.skip(getLengthField()); - if (skipped < getLengthField()) + if (skipped < OFstatic_cast(offile_off_t, getLengthField())) { /* If desired, specific parser errors will be ignored */ if (dcmIgnoreParsingErrors.get()) @@ -1241,11 +1252,39 @@ void DcmElement::transferInit() OFCondition DcmElement::write(DcmOutputStream &outStream, const E_TransferSyntax oxfer, - const E_EncodingType /*enctype*/, + const E_EncodingType enctype, DcmWriteCache *wcache) { DcmWriteCache wcache2; + /* Create an object that represents this object's data type */ + DcmVR myvr(getVR()); + + /* create an object that represents the transfer syntax */ + DcmXfer outXfer(oxfer); + + /* getValidEVR() will convert post 1993 VRs to "OB" if these are disabled */ + DcmEVR vr = myvr.getValidEVR(); + + /* compute length of element value */ + const Uint32 elemLength = getLength(oxfer, enctype); + + /* Create an object that represents this object's "valid" data type */ + DcmVR myvalidvr(vr); + + if ((elemLength) > 0xffff && (! myvalidvr.usesExtendedLengthEncoding()) && outXfer.isExplicitVR()) + { + /* special case: we are writing in explicit VR, the VR of this + * element uses a 2-byte length encoding, but the element length is + * too large for a 2-byte length field. We need to write this element + * as VR=UN (or VR=OB if the generation of UN is disabled). + * In this method, the variable "vr" is only used to determine the + * output byte order, which is always the same for OB and UN. + * Therefore, we do not need to distinguish between these two. + */ + vr = EVR_UN; + } + /* In case the transfer state is not initialized, this is an illegal call */ if (getTransferState() == ERW_notInitialized) errorFlag = EC_IllegalCall; @@ -1257,8 +1296,17 @@ OFCondition DcmElement::write(DcmOutputStream &outStream, errorFlag = outStream.status(); if (errorFlag.good()) { - /* create an object that represents the transfer syntax */ - DcmXfer outXfer(oxfer); + E_ByteOrder outByteOrder; + + /* determine the transfer syntax's byte ordering for this element */ + if (getTag() == DCM_PixelData) + outByteOrder = outXfer.getPixelDataByteOrder(); + else outByteOrder = outXfer.getByteOrder(); + + /* UN and OB element content always needs to be written in little endian. + We need to set this manually for the case that we are converting + elements to UN or OB while writing because some post-1993 VRs are disabled */ + if ((vr == EVR_OB) || (vr == EVR_UN)) outByteOrder = EBO_LittleEndian; /* pointer to element value if value resides in memory or old-style * write behaviour is active (i.e. everything loaded into memory upon write) @@ -1277,7 +1325,7 @@ OFCondition DcmElement::write(DcmOutputStream &outStream, { /* get this element's value. Mind the byte ordering (little */ /* or big endian) of the transfer syntax which shall be used */ - value = OFstatic_cast(Uint8 *, getValue(outXfer.getByteOrder())); + value = OFstatic_cast(Uint8 *, getValue(outByteOrder)); if (value) accessPossible = OFTrue; } else @@ -1290,7 +1338,7 @@ OFCondition DcmElement::write(DcmOutputStream &outStream, if (!wcache) wcache = &wcache2; /* initialize cache object. This is safe even if the object was already initialized */ - wcache->init(this, getLengthField(), getTransferredBytes(), outXfer.getByteOrder()); + wcache->init(this, getLengthField(), getTransferredBytes(), outByteOrder); /* access first block of element content */ errorFlag = wcache->fillBuffer(*this); @@ -1309,8 +1357,8 @@ OFCondition DcmElement::write(DcmOutputStream &outStream, * in the buffer, check if the buffer is still sufficient for the requirements * of this element, which may need only 8 instead of 12 bytes. */ - if ((outStream.avail() >= DCM_TagInfoLength) || - (outStream.avail() >= getTagAndLengthSize(oxfer))) + if ((outStream.avail() >= OFstatic_cast(offile_off_t, DCM_TagInfoLength)) || + (outStream.avail() >= OFstatic_cast(offile_off_t, getTagAndLengthSize(oxfer)))) { /* if there is no value, Length (member variable) shall be set to 0 */ if (! accessPossible) setLengthField(0); @@ -1804,7 +1852,7 @@ OFCondition DcmElement::getPartialValue(void *targetBuffer, if (bytesToRead > 0) { // here we read the main block of data - if (bytesToRead != readStream->read(targetBufferChar, bytesToRead)) + if (OFstatic_cast(offile_off_t, bytesToRead) != readStream->read(targetBufferChar, bytesToRead)) return EC_InvalidStream; // swap to desired byte order. fByteOrder contains the byte order in file. @@ -2128,3 +2176,21 @@ OFCondition DcmElement::checkVM(const unsigned long vmNum, } return result; } + +OFBool DcmElement::matches(const DcmElement& candidate, + const OFBool enableWildCardMatching) const +{ + OFstatic_cast(void,candidate); + OFstatic_cast(void,enableWildCardMatching); + return OFFalse; +} + +OFBool DcmElement::combinationMatches(const DcmElement& keySecond, + const DcmElement& candidateFirst, + const DcmElement& candidateSecond) const +{ + OFstatic_cast(void,keySecond); + OFstatic_cast(void,candidateFirst); + OFstatic_cast(void,candidateSecond); + return OFFalse; +} diff --git a/dcmdata/libsrc/dcfilefo.cc b/dcmdata/libsrc/dcfilefo.cc index f12bbb55..4cc2ef2a 100644 --- a/dcmdata/libsrc/dcfilefo.cc +++ b/dcmdata/libsrc/dcfilefo.cc @@ -693,7 +693,15 @@ OFCondition DcmFileFormat::read(DcmInputStream &inStream, const E_TransferSyntax xfer, const E_GrpLenEncoding glenc, const Uint32 maxReadLength) +{ + return DcmFileFormat::readUntilTag(inStream,xfer,glenc,maxReadLength,DCM_UndefinedTagKey); +} +OFCondition DcmFileFormat::readUntilTag(DcmInputStream &inStream, + const E_TransferSyntax xfer, + const E_GrpLenEncoding glenc, + const Uint32 maxReadLength, + const DcmTagKey &stopParsingAtElement) { if (getTransferState() == ERW_notInitialized) errorFlag = EC_IllegalCall; @@ -749,7 +757,7 @@ OFCondition DcmFileFormat::read(DcmInputStream &inStream, { if (dataset && dataset->transferState() != ERW_ready) { - errorFlag = dataset->read(inStream, newxfer, glenc, maxReadLength); + errorFlag = dataset->readUntilTag(inStream, newxfer, glenc, maxReadLength,stopParsingAtElement); } } } @@ -761,7 +769,7 @@ OFCondition DcmFileFormat::read(DcmInputStream &inStream, setTransferState(ERW_ready); } return errorFlag; -} // DcmFileFormat::read() +} // DcmFileFormat::readUntilTag() // ******************************** @@ -873,15 +881,26 @@ OFCondition DcmFileFormat::write(DcmOutputStream &outStream, // ******************************** - OFCondition DcmFileFormat::loadFile(const OFFilename &fileName, const E_TransferSyntax readXfer, const E_GrpLenEncoding groupLength, const Uint32 maxReadLength, const E_FileReadMode readMode) +{ + return DcmFileFormat::loadFileUntilTag(fileName, readXfer, groupLength, maxReadLength, readMode, DCM_UndefinedTagKey); +} + + +OFCondition DcmFileFormat::loadFileUntilTag( + const OFFilename &fileName, + const E_TransferSyntax readXfer, + const E_GrpLenEncoding groupLength, + const Uint32 maxReadLength, + const E_FileReadMode readMode, + const DcmTagKey &stopParsingAtElement) { if (readMode == ERM_dataset) - return getDataset()->loadFile(fileName, readXfer, groupLength, maxReadLength); + return getDataset()->loadFileUntilTag(fileName, readXfer, groupLength, maxReadLength, stopParsingAtElement); OFCondition l_error = EC_InvalidFilename; /* check parameters first */ @@ -902,7 +921,7 @@ OFCondition DcmFileFormat::loadFile(const OFFilename &fileName, FileReadMode = readMode; /* read data from file */ transferInit(); - l_error = read(fileStream, readXfer, groupLength, maxReadLength); + l_error = readUntilTag(fileStream, readXfer, groupLength, maxReadLength, stopParsingAtElement); transferEnd(); /* restore old value */ FileReadMode = oldMode; diff --git a/dcmdata/libsrc/dcitem.cc b/dcmdata/libsrc/dcitem.cc index 3e480353..a357b66b 100644 --- a/dcmdata/libsrc/dcitem.cc +++ b/dcmdata/libsrc/dcitem.cc @@ -166,8 +166,18 @@ int DcmItem::compare(const DcmItem& rhs) const myThis = OFconst_cast(DcmItem*, this); myRhs = OFconst_cast(DcmItem*, &rhs); - // iterate over all items and test equality + // check length, i.e. number of elements in item unsigned long thisVM = myThis->card(); + unsigned long rhsVM = myRhs->card(); + if (thisVM < rhsVM) + { + return -1; + } + else if (thisVM > rhsVM) + { + return 1; + } + // iterate over all items and test equality for (unsigned long count = 0; count < thisVM; count++) { DcmElement* val = myThis->getElement(count); @@ -183,25 +193,9 @@ int DcmItem::compare(const DcmItem& rhs) const } // otherwise they are equal, continue comparison } - else - { - break; // values equal until this point (rhs shorter) - } } } - // we get here if all values are equal. Now look at the - // number of components - unsigned long rhsVM = myRhs->card(); - if (thisVM < rhsVM) - { - return -1; - } - else if (thisVM > rhsVM) - { - return 1; - } - // all values as well as VM equal: objects are equal return 0; } @@ -361,7 +355,8 @@ void DcmItem::checkAndUpdateVR(DcmItem &item, DcmTag &tag) { /* handle special cases where the VR can be determined by some other element values */ - if (((tag == DCM_WaveformData) || (tag == DCM_WaveformPaddingValue)) && (tag.getEVR() == EVR_ox)) + if (((tag == DCM_WaveformData) || (tag == DCM_WaveformPaddingValue) || + (tag == DCM_ChannelMinimumValue) || (tag == DCM_ChannelMaximumValue)) && (tag.getEVR() == EVR_ox)) { /* case 1 (WaveformData and others): see section 8.3 in PS 3.5 */ Uint16 bitsAlloc; @@ -383,7 +378,11 @@ void DcmItem::checkAndUpdateVR(DcmItem &item, } else if (((tag == DCM_PixelPaddingValue) || (tag == DCM_PixelPaddingRangeLimit) || (tag == DCM_HistogramFirstBinValue) || (tag == DCM_HistogramLastBinValue) || - (tag == DCM_ZeroVelocityPixelValue)) && (tag.getEVR() == EVR_xs)) + (tag == DCM_ZeroVelocityPixelValue) || (tag == DCM_SmallestImagePixelValue) || + (tag == DCM_LargestImagePixelValue) || (tag == DCM_SmallestPixelValueInSeries) || + (tag == DCM_LargestPixelValueInSeries) || (tag == DCM_LUTDescriptor) || + (tag == DCM_RealWorldValueLastValueMapped) || (tag == DCM_RealWorldValueFirstValueMapped)) && + (tag.getEVR() == EVR_xs)) { /* case 2 (PixelPaddingValue and others): see section C.7.5.1, C.7.6.16.x and C.11.5 in PS 3.3 */ Uint16 pixelRep; @@ -964,7 +963,7 @@ OFCondition DcmItem::readTagAndLength(DcmInputStream &inStream, /* check if either 4 (for implicit transfer syntaxes) or 6 (for explicit transfer */ /* syntaxes) bytes are available in (i.e. can be read from) inStream. if an error */ /* occurred while performing this check return this error */ - if (inStream.avail() < (xferSyn.isExplicitVR() ? 6u:4u)) + if (inStream.avail() < OFstatic_cast(offile_off_t, xferSyn.isExplicitVR() ? 6 : 4)) return EC_StreamNotifyClient; /* determine the byte ordering of the transfer syntax which was passed; */ @@ -1084,7 +1083,7 @@ OFCondition DcmItem::readTagAndLength(DcmInputStream &inStream, /* the next thing we want to do is read the value in the length field from inStream. */ /* determine if there is a corresponding amount of bytes (for the length field) still */ /* available in inStream. If not, return an error. */ - if (inStream.avail() < xferSyn.sizeofTagHeader(newEVR) - bytesRead) + if (inStream.avail() < OFstatic_cast(offile_off_t, xferSyn.sizeofTagHeader(newEVR) - bytesRead)) { inStream.putback(); // the UnsetPutbackMark is in readSubElement bytesRead = 0; @@ -1153,7 +1152,7 @@ OFCondition DcmItem::readTagAndLength(DcmInputStream &inStream, inStream.putback(); } } - else if (valueLength > remainingItemBytes) + else if (OFstatic_cast(offile_off_t, valueLength) > remainingItemBytes) { DCMDATA_WARN("DcmItem: Element " << newTag.getTagName() << " " << newTag << " larger (" << valueLength << ") than remaining bytes (" @@ -1277,6 +1276,15 @@ OFCondition DcmItem::read(DcmInputStream & inStream, const E_TransferSyntax xfer, const E_GrpLenEncoding glenc, const Uint32 maxReadLength) +{ + return DcmItem::readUntilTag(inStream, xfer, glenc, maxReadLength, DCM_UndefinedTagKey); +} + +OFCondition DcmItem::readUntilTag(DcmInputStream & inStream, + const E_TransferSyntax xfer, + const E_GrpLenEncoding glenc, + const Uint32 maxReadLength, + const DcmTagKey &stopParsingAtElement) { /* check if this is an illegal call; if so set the error flag and do nothing, else go ahead */ if (getTransferState() == ERW_notInitialized) @@ -1354,17 +1362,30 @@ OFCondition DcmItem::read(DcmInputStream & inStream, /* in case of implicit VR, check whether the "default VR" is really appropriate */ if (DcmXfer(xfer).isImplicitVR()) checkAndUpdateVR(*this, newTag); - /* read the actual data value which belongs to this element */ - /* (attribute) and insert this information into the elementList */ - errorFlag = readSubElement(inStream, newTag, newValueLength, xfer, glenc, maxReadLength); - /* if reading was successful, we read the entire data value information */ - /* for this element; hence lastElementComplete is true again */ - if (errorFlag.good()) + + /* check if we want to stop parsing at this point, in the main dataset only */ + if( (stopParsingAtElement != DCM_UndefinedTagKey) && (newTag.getXTag()>=stopParsingAtElement) && ident() == EVR_dataset) + { + lastElementComplete = OFTrue; + readStopElem = OFTrue; + DCMDATA_WARN("DcmItem: Element " << newTag.getTagName() << " " << newTag + << " encountered, skipping rest of dataset"); + } + else + { + /* read the actual data value which belongs to this element */ + /* (attribute) and insert this information into the elementList */ + errorFlag = readSubElement(inStream, newTag, newValueLength, xfer, glenc, maxReadLength); + /* if reading was successful, we read the entire data value information */ + /* for this element; hence lastElementComplete is true again */ + if (errorFlag.good()) lastElementComplete = OFTrue; - /* in data or command sets, group 0x0001 to 0x0003, 0x0005, 0x0007 and 0xFFFF are not allowed. */ - /* (we cannot check for group 0x0000 since we do not know whether we read a data or command set.)*/ - if (!newTag.hasValidGroup() || (newTag.getGroup() == 0x0002)) - DCMDATA_WARN("DcmItem: Invalid Element " << newTag << " found in data set"); + + /* in data or command sets, group 0x0001 to 0x0003, 0x0005, 0x0007 and 0xFFFF are not allowed. */ + /* (we cannot check for group 0x0000 since we do not know whether we read a data or command set.)*/ + if (!newTag.hasValidGroup() || (newTag.getGroup() == 0x0002)) + DCMDATA_WARN("DcmItem: Invalid Element " << newTag << " found in data set"); + } } } else { /* if lastElementComplete is false, we have only read the current element's */ @@ -4189,25 +4210,40 @@ OFCondition DcmItem::convertToUTF8() // ******************************** -DcmElement* DcmItem::newDicomElement(const DcmTagKey& tag) +DcmElement* DcmItem::newDicomElement(const DcmTagKey& tag, + const char *privateCreator) { - DcmTag temp(tag); + DcmTag temp(tag, privateCreator); DcmElement* elem = NULL; - OFBool readAsUN = OFFalse; - newDicomElement( - elem, - temp, - 0, // Length - NULL, // Private creator - readAsUN); // read as VR UN (result ignored) + OFBool readAsUN = OFFalse; + newDicomElement( + elem, + temp, + 0, // Length + NULL, // Private creator + readAsUN); // read as VR UN (result ignored) return elem; } +OFCondition DcmItem::newDicomElementWithVR(DcmElement*& newElement, const DcmTag& tag) +{ + DcmTag temp(tag); + OFBool readAsUN = OFFalse; + return newDicomElement( + newElement, + temp, + 0, // Length + NULL, // Private creator + readAsUN); // read as VR UN (result ignored) +} + + OFCondition DcmItem::newDicomElement(DcmElement*& newElement, - const DcmTagKey& tag) + const DcmTagKey& tag, + const char *privateCreator) { - DcmTag temp(tag); + DcmTag temp(tag, privateCreator); newElement = NULL; OFBool readAsUN = OFFalse; return newDicomElement( diff --git a/dcmdata/libsrc/dcjson.cc b/dcmdata/libsrc/dcjson.cc index df68daa4..9efb1b9b 100644 --- a/dcmdata/libsrc/dcjson.cc +++ b/dcmdata/libsrc/dcjson.cc @@ -213,14 +213,14 @@ void DcmJsonFormat::printNextArrayElementPrefix(STD_NAMESPACE ostream &out) // Method for holding and determine if BulkDataURI should be printed. // This also manipulate uri String, if BulkDataURI should be printed. -OFBool DcmJsonFormat::asBulkDataURI(const DcmTagKey& tag, OFString& uri) +OFBool DcmJsonFormat::asBulkDataURI(const DcmTagKey& /*tag*/, OFString& /*uri*/) { return false; } //Class for formatted output -DcmJsonFormatPretty::DcmJsonFormatPretty(const OFBool printMetaheaderInformation) -: DcmJsonFormat(printMetaheaderInformation) +DcmJsonFormatPretty::DcmJsonFormatPretty(const OFBool printMetaInfo) +: DcmJsonFormat(printMetaInfo) , m_IndentionLevel(0) { @@ -255,13 +255,13 @@ OFString DcmJsonFormatPretty::space() //Class for unformatted output -DcmJsonFormatCompact::DcmJsonFormatCompact(const OFBool printMetaheaderInformation) -: DcmJsonFormat(printMetaheaderInformation) +DcmJsonFormatCompact::DcmJsonFormatCompact(const OFBool printMetaInfo) +: DcmJsonFormat(printMetaInfo) { } -void DcmJsonFormatCompact::printIndention(STD_NAMESPACE ostream& out) +void DcmJsonFormatCompact::printIndention(STD_NAMESPACE ostream& /*out*/) {} void DcmJsonFormatCompact::increaseIndention() diff --git a/dcmdata/libsrc/dcmatch.cc b/dcmdata/libsrc/dcmatch.cc index febb140b..9a9e7e8d 100644 --- a/dcmdata/libsrc/dcmatch.cc +++ b/dcmdata/libsrc/dcmatch.cc @@ -22,6 +22,7 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/ofstd/ofmem.h" +#include "dcmtk/ofstd/ofdiag.h" #include "dcmtk/dcmdata/dcmatch.h" #include "dcmtk/dcmdata/dcvr.h" #include "dcmtk/dcmdata/dcvrda.h" @@ -188,6 +189,8 @@ OFBool DcmAttributeMatching::rangeMatchingDateTime( const void* dateQueryData, c { if( !dateQuerySize ) return rangeMatchingTime( timeQueryData, timeQuerySize, timeCandidateData, timeCandidateSize ); + if( !timeQuerySize ) + return rangeMatchingDate( dateQueryData, dateQuerySize, dateCandidateData, dateCandidateSize ); OFDateTime candidate; if( DcmDate::getOFDateFromString( OFreinterpret_cast( const char*, dateCandidateData ), dateCandidateSize, candidate.Date ).bad() ) return OFFalse; @@ -196,7 +199,7 @@ OFBool DcmAttributeMatching::rangeMatchingDateTime( const void* dateQueryData, c const DashSeparated dateQuery( dateQueryData, dateQuerySize ); const DashSeparated timeQuery( timeQueryData, timeQuerySize ); // check that both date/time ranges have the same structure - if( ( dateQuery.first == dateQuery.second ) != ( timeQuery.first != timeQuery.second ) ) + if( ( dateQuery.first != dateQuery.second ) != ( timeQuery.first != timeQuery.second ) ) return OFFalse; if( ( !dateQuery.firstSize && timeQuery.firstSize ) || ( !dateQuery.secondSize && timeQuery.secondSize ) ) return OFFalse; @@ -311,7 +314,10 @@ DcmAttributeMatching::DcmAttributeMatching( const DcmVR vr ) DcmAttributeMatching::operator OFBool() const { +#include DCMTK_DIAGNOSTIC_PUSH +#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_PERFORMANCE_WARNING return m_pMatch; +#include DCMTK_DIAGNOSTIC_POP } OFBool DcmAttributeMatching::operator!() const diff --git a/dcmdata/libsrc/dcobject.cc b/dcmdata/libsrc/dcobject.cc index 3bdb1e2e..d6917f36 100644 --- a/dcmdata/libsrc/dcobject.cc +++ b/dcmdata/libsrc/dcobject.cc @@ -467,9 +467,14 @@ Uint32 DcmObject::getTagAndLengthSize(const E_TransferSyntax oxfer) const /* map "UN" to "OB" if generation of "UN" is disabled */ DcmVR outvr(getTag().getVR().getValidEVR()); - if (outvr.usesExtendedLengthEncoding()) + if (Length > 0xffff || outvr.usesExtendedLengthEncoding()) { - return 12; + // we are either using extended length encoding or the + // element length is > 64k (i.e. we have to convert to OB/UN). + // In any case we need a 12-byte header field. + // This is also the case for any object with undefined length, + // so we don't need to check that as a special case. + return 12; } } return 8; @@ -526,6 +531,15 @@ OFCondition DcmObject::writeTagAndLength(DcmOutputStream &outStream, /* getValidEVR() will convert datatype "UN" to "OB" if generation of "UN" is disabled */ DcmEVR vr = myvr.getValidEVR(); + myvr.setVR(vr); + + if (Length > 0xffff && (!myvr.usesExtendedLengthEncoding())) + { + // Attribute length is larger than 64 kBytes. + // We need to encode this as UN (or OB, if generation of UN is disabled + if (dcmEnableUnknownVRGeneration.get()) vr = EVR_UN; else vr = EVR_OB; + myvr.setVR(vr); + } /* get name of data type */ const char *vrname = myvr.getValidVRName(); @@ -563,7 +577,10 @@ OFCondition DcmObject::writeTagAndLength(DcmOutputStream &outStream, outStream.write(&valueLength, 2); // write length, 2 bytes wide writtenBytes += 2; // remember that 2 bytes were written in total } - /* ... if not, report an error message and return an error code. */ + /* ... if not, report an error message and return an error code. + * This should never happen because we automatically convert such + * elements to UN/OB, but just in case, we leave the check in here. + */ else { DcmTag tag(Tag); DCMDATA_ERROR("DcmObject: Length of element " << tag.getTagName() << " " << tag diff --git a/dcmdata/libsrc/dcostrmf.cc b/dcmdata/libsrc/dcostrmf.cc index d440c845..ac6ef7a2 100644 --- a/dcmdata/libsrc/dcostrmf.cc +++ b/dcmdata/libsrc/dcostrmf.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2012, OFFIS e.V. + * Copyright (C) 2002-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,7 +25,6 @@ #include "dcmtk/dcmdata/dcerror.h" #define INCLUDE_CSTDIO -#define INCLUDE_CERRNO #include "dcmtk/ofstd/ofstdinc.h" @@ -36,10 +35,8 @@ DcmFileConsumer::DcmFileConsumer(const OFFilename &filename) { if (!file_.fopen(filename, "wb")) { - char buf[256]; - const char *text = OFStandard::strerror(errno, buf, sizeof(buf)); - if (text == NULL) text = "(unknown error code)"; - status_ = makeOFCondition(OFM_dcmdata, 19, OF_error, text); + OFString buffer = OFStandard::getLastSystemErrorCode().message(); + status_ = makeOFCondition(OFM_dcmdata, 19, OF_error, buffer.c_str()); } } diff --git a/dcmdata/libsrc/dcpixel.cc b/dcmdata/libsrc/dcpixel.cc index c21acc44..7cdd3768 100644 --- a/dcmdata/libsrc/dcpixel.cc +++ b/dcmdata/libsrc/dcpixel.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2010, OFFIS e.V. + * Copyright (C) 1997-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -25,6 +25,7 @@ #include "dcmtk/dcmdata/dcpixseq.h" #include "dcmtk/dcmdata/dcdeftag.h" #include "dcmtk/dcmdata/dcitem.h" +#include "dcmtk/dcmdata/dcpxitem.h" // // class DcmRepresentationEntry @@ -172,18 +173,6 @@ DcmPixelData &DcmPixelData::operator=(const DcmPixelData &obj) return *this; } - -OFCondition DcmPixelData::copyFrom(const DcmObject& rhs) -{ - if (this != &rhs) - { - if (rhs.ident() != ident()) return EC_IllegalCall; - *this = OFstatic_cast(const DcmPixelData &, rhs); - } - return EC_Normal; -} - - // methods in alphabetical order Uint32 @@ -222,6 +211,10 @@ DcmPixelData::canChooseRepresentation( const DcmRepresentationEntry findEntry(repType, repParam, NULL); DcmRepresentationListIterator resultIt(repListEnd); + // find out whether we have the desired target representation available. Three possibilities: + // 1. we have uncompressed data, and target is uncompressed (conversion betweeen uncompressed always possible) + // 2. we have uncompressed and want compressed, but we are forced to write uncompressed anyway + // 3. we want to go to compressed, and already have the desired representation available if ((!toType.isEncapsulated() && existUnencapsulated) || (toType.isEncapsulated() && writeUnencapsulated(repType) && existUnencapsulated) || (toType.isEncapsulated() && findRepresentationEntry(findEntry, resultIt) == EC_Normal)) @@ -229,18 +222,20 @@ DcmPixelData::canChooseRepresentation( // representation found result = OFTrue; } + // otherwise let's see whether we know how to convert to the target representation else { // representation not found, check if we have a codec that can create the // desired representation. if (original == repListEnd) { + // we have uncompressed data, check whether we know how to go from uncompressed to desired compression result = DcmCodecList::canChangeCoding(EXS_LittleEndianExplicit, toType.getXfer()); } else if (toType.isEncapsulated()) { - result = DcmCodecList::canChangeCoding(EXS_LittleEndianExplicit, toType.getXfer()); - + // we have already compressed data, check whether we know how to transcode + result = DcmCodecList::canChangeCoding((*original)->repType, toType.getXfer()); if (!result) { // direct transcoding is not possible. Check if we can decode and then encode. @@ -250,6 +245,7 @@ DcmPixelData::canChooseRepresentation( } else { + // target transfer syntax is uncompressed, look whether decompression is possible result = DcmCodecList::canChangeCoding((*original)->repType, EXS_LittleEndianExplicit); } } @@ -308,8 +304,112 @@ DcmPixelData::chooseRepresentation( } -void -DcmPixelData::clearRepresentationList( +int DcmPixelData::compare(const DcmElement& rhs) const +{ + // check tag and VR + int result = DcmElement::compare(rhs); + if (result != 0) + { + return result; + } + + // cast away constness (dcmdata is not const correct...) + DcmPixelData* myThis = NULL; + DcmPixelData* myRhs = NULL; + myThis = OFconst_cast(DcmPixelData*, this); + myRhs = OFstatic_cast(DcmPixelData*, OFconst_cast(DcmElement*, &rhs)); + + if (myThis->existUnencapsulated && myRhs->existUnencapsulated) + { + // we have uncompressed representations, which can be compared using DcmPolymorphOBOW::compare + return DcmPolymorphOBOW::compare(rhs); + } + + // both do not have uncompressed data, we must compare compressed ones. + // check both have a current representation at all. + if ((myThis->current == myThis->repList.end()) && (myRhs->current != myRhs->repList.end())) return -1; + if ((myThis->current != myThis->repList.end()) && (myRhs->current == myRhs->repList.end())) return 1; + if ((myThis->current == myThis->repList.end()) && (myRhs->current == myRhs->repList.end())) + { + // if one of both have uncompressed data at least, that one is considered "bigger" + if (myThis->existUnencapsulated) return 1; + if (myRhs->existUnencapsulated) return -1; + else return 0; + } + + // both have compressed data: compare current representation (only) + if ((myThis->current != myThis->repList.end()) && (myRhs->current != myRhs->repList.end()) ) + { + E_TransferSyntax myRep = (*(myThis->current))->repType; + E_TransferSyntax rhsRep = (*(myRhs->current))->repType; + DcmXfer myXfer(myRep); + DcmXfer rhsXfer(rhsRep); + // if both transfer syntaxes are different, we have to perform more checks to + // find out whether the related pixel data is comparable; this is the case + // for all uncompressed transfer syntaxes, except Big Endian with OW data + // since it uses a different memory layout, and we do not want to byte-swap + // the values for the comparison. + if (myRep != rhsRep) + { + return 1; + } + else + { + // For compressed, compare pixel items bytewise + DcmPixelSequence* myPix = (*(myThis->current))->pixSeq; + DcmPixelSequence* rhsPix = (*(myRhs->current))->pixSeq; + if (!myPix && rhsPix) return -1; + if (myPix && !rhsPix) return 1; + if (!myPix && !rhsPix) return 0; + // Check number of pixel items + long unsigned int myNumPix = myPix->card(); + long unsigned int rhsNumPix = rhsPix->card(); + if (myNumPix < rhsNumPix) return -1; + if (myNumPix > rhsNumPix) return 1; + // loop over pixel items, both have the same number of pixel items + for (unsigned long n = 0; n < myNumPix; n++) + { + DcmPixelItem* myPixItem = NULL; + DcmPixelItem* rhsPixItem = NULL; + if (myPix->getItem(myPixItem, n).good() && rhsPix->getItem(rhsPixItem, n).good()) + { + // compare them value by value, using DcmOtherByteOtherWord::compare() method + int result = myPixItem->compare(*rhsPixItem); + if (result != 0) + { + return result; + } + } + else + { + DCMDATA_ERROR("Internal error: Could not get pixel item #" << n << " from Pixel Sequence"); + return 1; + } + } + return 0; + } + } + // if one of both have a current representation; consider that one "bigger". + // if none has a current one, consider both equal (neither uncompressed or compressed data present). + else + { + if (myThis->current != myThis->repList.end()) return 1; + if (myRhs->current != myRhs->repList.end()) return -1; + else return 0; + } +} + +OFCondition DcmPixelData::copyFrom(const DcmObject& rhs) +{ + if (this != &rhs) + { + if (rhs.ident() != ident()) return EC_IllegalCall; + *this = OFstatic_cast(const DcmPixelData &, rhs); + } + return EC_Normal; +} + +void DcmPixelData::clearRepresentationList( DcmRepresentationListIterator leaveInList) { /* define iterators to go through all representations in the list */ diff --git a/dcmdata/libsrc/dcsequen.cc b/dcmdata/libsrc/dcsequen.cc index 600c0f80..a44f4504 100644 --- a/dcmdata/libsrc/dcsequen.cc +++ b/dcmdata/libsrc/dcsequen.cc @@ -204,8 +204,19 @@ int DcmSequenceOfItems::compare(const DcmElement& rhs) const myThis = OFconst_cast(DcmSequenceOfItems*, this); myRhs = OFstatic_cast(DcmSequenceOfItems*, OFconst_cast(DcmElement*, &rhs)); - /* iterate over all items and test equality */ + /* check number of items */ + unsigned long rhsVM = myRhs->card(); unsigned long thisVM = myThis->card(); + if (thisVM < rhsVM) + { + return -1; + } + else if (thisVM > rhsVM) + { + return 1; + } + + /* iterate over all items and test equality */ for (unsigned long count = 0; count < thisVM; count++) { DcmItem* val = myThis->getItem(count); @@ -220,24 +231,9 @@ int DcmSequenceOfItems::compare(const DcmElement& rhs) const return result; } } - else - { - break; // values equal until this point (rhs shorter) - } } } - /* we get here if all values are equal. Now look at the number of components. */ - unsigned long rhsVM = myRhs->card(); - if (thisVM < rhsVM) - { - return -1; - } - else if (thisVM > rhsVM) - { - return 1; - } - /* all values as well as VM equal: objects are equal */ return 0; } @@ -792,8 +788,8 @@ OFCondition DcmSequenceOfItems::write(DcmOutputStream &outStream, * in the buffer, check if the buffer is still sufficient for the requirements * of this element, which may need only 8 instead of 12 bytes. */ - if ((outStream.avail() >= DCM_TagInfoLength) || - (outStream.avail() >= getTagAndLengthSize(oxfer))) + if ((outStream.avail() >= OFstatic_cast(offile_off_t, DCM_TagInfoLength)) || + (outStream.avail() >= OFstatic_cast(offile_off_t, getTagAndLengthSize(oxfer)))) { if (enctype == EET_ExplicitLength) setLengthField(getLength(oxfer, enctype)); @@ -916,8 +912,8 @@ OFCondition DcmSequenceOfItems::writeSignatureFormat(DcmOutputStream &outStream, * in the buffer, check if the buffer is still sufficient for the requirements * of this element, which may need only 8 instead of 12 bytes. */ - if ((outStream.avail() >= DCM_TagInfoLength) || - (outStream.avail() >= getTagAndLengthSize(oxfer))) + if ((outStream.avail() >= OFstatic_cast(offile_off_t, DCM_TagInfoLength)) || + (outStream.avail() >= OFstatic_cast(offile_off_t, getTagAndLengthSize(oxfer)))) { if (enctype == EET_ExplicitLength) setLengthField(getLength(oxfer, enctype)); diff --git a/dcmdata/libsrc/dcuid.cc b/dcmdata/libsrc/dcuid.cc index a5b86e65..b594b024 100644 --- a/dcmdata/libsrc/dcuid.cc +++ b/dcmdata/libsrc/dcuid.cc @@ -24,11 +24,9 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #ifdef HAVE_WINDOWS_H -#include /* this includes either winsock.h or winsock2.h */ -#else -#ifdef HAVE_WINSOCK_H -#include /* include winsock.h directly i.e. on MacOS */ -#endif +// on Windows, we need Winsock2 for getting network adapter information +#include +#include #endif #define INCLUDE_CSTDLIB @@ -79,6 +77,7 @@ END_EXTERN_C #include "dcmtk/ofstd/ofcrc32.h" #include "dcmtk/ofstd/ofdefine.h" #include "dcmtk/ofstd/ofstd.h" +#include "dcmtk/ofstd/ofvector.h" #include "dcmtk/ofstd/ofnetdb.h" struct UIDNameMap { @@ -137,9 +136,11 @@ static const UIDNameMap uidNameMap[] = { { UID_HEVCMain10ProfileLevel5_1TransferSyntax, "HEVCMain10Profile/Level5.1" }, { UID_RFC2557MIMEEncapsulationTransferSyntax, "RFC2557MIMEEncapsulation" }, { UID_XMLEncodingTransferSyntax, "XMLEncoding" }, + { UID_PrivateGE_LEI_WithBigEndianPixelDataTransferSyntax, "PrivateGELittleEndianImplicitWithBigEndianPixelData" }, // Storage (DICOM) { UID_AcquisitionContextSRStorage, "AcquisitionContextSRStorage" }, + { UID_AdvancedBlendingPresentationStateStorage, "AdvancedBlendingPresentationStateStorage" }, { UID_AmbulatoryECGWaveformStorage, "AmbulatoryECGWaveformStorage" }, { UID_ArterialPulseWaveformStorage, "ArterialPulseWaveformStorage" }, { UID_AutorefractionMeasurementsStorage, "AutorefractionMeasurementsStorage" }, @@ -210,14 +211,18 @@ static const UIDNameMap uidNameMap[] = { { UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage, "MultiframeGrayscaleWordSecondaryCaptureImageStorage" }, { UID_MultiframeSingleBitSecondaryCaptureImageStorage, "MultiframeSingleBitSecondaryCaptureImageStorage" }, { UID_MultiframeTrueColorSecondaryCaptureImageStorage, "MultiframeTrueColorSecondaryCaptureImageStorage" }, + { UID_MultipleVolumeRenderingVolumetricPresentationStateStorage, "MultipleVolumeRenderingVolumetricPresentationStateStorage" }, { UID_NuclearMedicineImageStorage, "NuclearMedicineImageStorage" }, { UID_OphthalmicAxialMeasurementsStorage, "OphthalmicAxialMeasurementsStorage" }, + { UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage, "OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage" }, + { UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage, "OphthalmicOpticalCoherenceTomographyEnFaceImageStorage" }, { UID_OphthalmicPhotography16BitImageStorage, "OphthalmicPhotography16BitImageStorage" }, { UID_OphthalmicPhotography8BitImageStorage, "OphthalmicPhotography8BitImageStorage" }, { UID_OphthalmicThicknessMapStorage, "OphthalmicThicknessMapStorage" }, { UID_OphthalmicTomographyImageStorage, "OphthalmicTomographyImageStorage" }, { UID_OphthalmicVisualFieldStaticPerimetryMeasurementsStorage, "OphthalmicVisualFieldStaticPerimetryMeasurementsStorage" }, { UID_ParametricMapStorage, "ParametricMapStorage" }, + { UID_PatientRadiationDoseSRStorage, "PatientRadiationDoseSRStorage" }, { UID_PositronEmissionTomographyImageStorage, "PositronEmissionTomographyImageStorage" }, { UID_ProcedureLogStorage, "ProcedureLogStorage" }, { UID_PseudoColorSoftcopyPresentationStateStorage, "PseudoColorSoftcopyPresentationStateStorage" }, @@ -238,6 +243,7 @@ static const UIDNameMap uidNameMap[] = { { UID_RTTreatmentSummaryRecordStorage, "RTTreatmentSummaryRecordStorage" }, { UID_SecondaryCaptureImageStorage, "SecondaryCaptureImageStorage" }, { UID_SegmentationStorage, "SegmentationStorage" }, + { UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage, "SegmentedVolumeRenderingVolumetricPresentationStateStorage" }, { UID_SimplifiedAdultEchoSRStorage, "SimplifiedAdultEchoSRStorage" }, { UID_SpatialFiducialsStorage, "SpatialFiducialsStorage" }, { UID_SpatialRegistrationStorage, "SpatialRegistrationStorage" }, @@ -260,6 +266,7 @@ static const UIDNameMap uidNameMap[] = { { UID_VLPhotographicImageStorage, "VLPhotographicImageStorage" }, { UID_VLSlideCoordinatesMicroscopicImageStorage, "VLSlideCoordinatesMicroscopicImageStorage" }, { UID_VLWholeSlideMicroscopyImageStorage, "VLWholeSlideMicroscopyImageStorage" }, + { UID_VolumeRenderingVolumetricPresentationStateStorage, "VolumeRenderingVolumetricPresentationStateStorage" }, { UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage, "WideFieldOphthalmicPhotographyStereographicProjectionImageStorage" }, { UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, "WideFieldOphthalmicPhotography3DCoordinatesImageStorage" }, { UID_XAXRFGrayscaleSoftcopyPresentationStateStorage, "XAXRFGrayscaleSoftcopyPresentationStateStorage" }, @@ -555,6 +562,7 @@ static const int uidNameMap_size = OFstatic_cast(int, sizeof(uidNameMap) / sizeo const char* dcmAllStorageSOPClassUIDs[] = { UID_AcquisitionContextSRStorage, + UID_AdvancedBlendingPresentationStateStorage, UID_AmbulatoryECGWaveformStorage, UID_ArterialPulseWaveformStorage, UID_AutorefractionMeasurementsStorage, @@ -618,14 +626,18 @@ const char* dcmAllStorageSOPClassUIDs[] = { UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage, UID_MultiframeSingleBitSecondaryCaptureImageStorage, UID_MultiframeTrueColorSecondaryCaptureImageStorage, + UID_MultipleVolumeRenderingVolumetricPresentationStateStorage, UID_NuclearMedicineImageStorage, UID_OphthalmicAxialMeasurementsStorage, + UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage, + UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage, UID_OphthalmicPhotography16BitImageStorage, UID_OphthalmicPhotography8BitImageStorage, UID_OphthalmicThicknessMapStorage, UID_OphthalmicTomographyImageStorage, UID_OphthalmicVisualFieldStaticPerimetryMeasurementsStorage, UID_ParametricMapStorage, + UID_PatientRadiationDoseSRStorage, UID_PositronEmissionTomographyImageStorage, UID_ProcedureLogStorage, UID_PseudoColorSoftcopyPresentationStateStorage, @@ -646,6 +658,7 @@ const char* dcmAllStorageSOPClassUIDs[] = { UID_RTTreatmentSummaryRecordStorage, UID_SecondaryCaptureImageStorage, UID_SegmentationStorage, + UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage, UID_SimplifiedAdultEchoSRStorage, UID_SpatialFiducialsStorage, UID_SpatialRegistrationStorage, @@ -668,6 +681,7 @@ const char* dcmAllStorageSOPClassUIDs[] = { UID_VLPhotographicImageStorage, UID_VLSlideCoordinatesMicroscopicImageStorage, UID_VLWholeSlideMicroscopyImageStorage, + UID_VolumeRenderingVolumetricPresentationStateStorage, UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage, UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, UID_XAXRFGrayscaleSoftcopyPresentationStateStorage, @@ -850,6 +864,7 @@ const char* dcmLongSCUStorageSOPClassUIDs[] = { UID_XRayRadiofluoroscopicImageStorage, // recently approved // UID_AcquisitionContextSRStorage, +// UID_AdvancedBlendingPresentationStateStorage, // UID_BreastProjectionXRayImageStorageForPresentation, // UID_BreastProjectionXRayImageStorageForProcessing, // UID_CompositingPlanarMPRVolumetricPresentationStateStorage, @@ -858,11 +873,17 @@ const char* dcmLongSCUStorageSOPClassUIDs[] = { // UID_CTPerformedProcedureProtocolStorage, // UID_ExtensibleSRStorage, // UID_GrayscalePlanarMPRVolumetricPresentationStateStorage +// UID_MultipleVolumeRenderingVolumetricPresentationStateStorage, +// UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage, +// UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage, // UID_ParametricMapStorage, +// UID_PatientRadiationDoseSRStorage, // UID_RadiopharmaceuticalRadiationDoseSRStorage, // UID_RTBrachyApplicationSetupDeliveryInstructionStorage, +// UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage, // UID_SimplifiedAdultEchoSRStorage, // UID_TractographyResultsStorage, +// UID_VolumeRenderingVolumetricPresentationStateStorage, // UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage, // UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, // non-patient @@ -1041,6 +1062,8 @@ const char* dcmImageSOPClassUIDs[] = { UID_MultiframeSingleBitSecondaryCaptureImageStorage, UID_MultiframeTrueColorSecondaryCaptureImageStorage, UID_NuclearMedicineImageStorage, + UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage, + UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage, UID_OphthalmicPhotography16BitImageStorage, UID_OphthalmicPhotography8BitImageStorage, UID_OphthalmicThicknessMapStorage, @@ -1103,6 +1126,7 @@ typedef struct { */ static const DcmModalityTable modalities[] = { { UID_AcquisitionContextSRStorage, "SRa", 4096 }, + { UID_AdvancedBlendingPresentationStateStorage, "PSa", 4096 }, { UID_AmbulatoryECGWaveformStorage, "ECA", 4096 }, { UID_ArterialPulseWaveformStorage, "WVa", 4096 }, { UID_AutorefractionMeasurementsStorage, "OPa", 4096 }, @@ -1172,14 +1196,18 @@ static const DcmModalityTable modalities[] = { { UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage, "SCw", 512 * 512 * 2 }, { UID_MultiframeSingleBitSecondaryCaptureImageStorage, "SCs", 1024 * 1024 }, /* roughly an A4 300dpi scan */ { UID_MultiframeTrueColorSecondaryCaptureImageStorage, "SCc", 512 * 512 * 3 }, + { UID_MultipleVolumeRenderingVolumetricPresentationStateStorage, "VPm" , 4096 }, { UID_NuclearMedicineImageStorage, "NM", 64 * 64 * 2 }, { UID_OphthalmicAxialMeasurementsStorage, "OPx", 4096 }, + { UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage, "OCb" , 768 * 576 }, + { UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage, "OCe", 768 * 576 * 2 }, { UID_OphthalmicPhotography16BitImageStorage, "OPw", 768 * 576 * 6 }, { UID_OphthalmicPhotography8BitImageStorage, "OPb", 768 * 576 * 3 }, { UID_OphthalmicThicknessMapStorage, "OPm", 768 * 576 }, { UID_OphthalmicTomographyImageStorage, "OPt", 768 * 576 * 3 }, { UID_OphthalmicVisualFieldStaticPerimetryMeasurementsStorage, "OPp", 4096 }, { UID_ParametricMapStorage, "PM", 256 * 256 * 4 }, + { UID_PatientRadiationDoseSRStorage, "SRq", 4096 }, { UID_PositronEmissionTomographyImageStorage, "PI", 512 * 512 * 2 }, { UID_ProcedureLogStorage, "SRp", 4096 }, { UID_PseudoColorSoftcopyPresentationStateStorage, "PSp", 4096 }, @@ -1200,6 +1228,7 @@ static const DcmModalityTable modalities[] = { { UID_RTTreatmentSummaryRecordStorage, "RTs", 4096 }, { UID_SecondaryCaptureImageStorage, "SC", 512 * 512 * 2 }, { UID_SegmentationStorage, "SG", 4096 }, + { UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage, "VPs", 4096 }, { UID_SimplifiedAdultEchoSRStorage, "SRu", 4096 }, { UID_SpatialFiducialsStorage, "FID", 4096 }, { UID_SpatialRegistrationStorage, "RGs", 4096 }, @@ -1221,7 +1250,8 @@ static const DcmModalityTable modalities[] = { { UID_VLMicroscopicImageStorage, "VLm", 768 * 576 * 3 }, { UID_VLPhotographicImageStorage, "VLp", 768 * 576 * 3 }, { UID_VLSlideCoordinatesMicroscopicImageStorage, "VLs", 768 * 576 * 3 }, - { UID_VLWholeSlideMicroscopyImageStorage, "VLw", 10000 * 10000 * 3}, + { UID_VLWholeSlideMicroscopyImageStorage, "VLw", 10000 * 10000 * 3 }, + { UID_VolumeRenderingVolumetricPresentationStateStorage, "VPv", 4096 }, { UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage, "OWs", 768 * 576 * 3 }, { UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, "OW3", 768 * 576 * 3 }, { UID_XAXRFGrayscaleSoftcopyPresentationStateStorage, "PSx", 4096 }, @@ -1395,12 +1425,14 @@ dcmIsImageStorageSOPClassUID(const char* uid) #ifndef HAVE_GETHOSTID #if defined(HAVE_SYSINFO) && defined(HAVE_SYS_SYSTEMINFO_H) +/* Implementation of gethostid() based on sysinfo(). + * This implementation is used, for example, on Solaris. + */ #include static long gethostid(void) { - char buf[256]; if (sysinfo(SI_HW_SERIAL, buf, 128) == -1) { - DCMDATA_FATAL("sysinfo: " << OFStandard::strerror(errno, buf, sizeof(buf))); + DCMDATA_FATAL("sysinfo: " << OFStandard::getLastSystemErrorCode().message()); exit(1); } #ifdef HAVE_STRTOUL @@ -1420,198 +1452,47 @@ static long gethostid(void) */ #if (defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME)) || defined(HAVE_WINDOWS_H) -// 16K should be large enough to handle everything pointed to by a struct hostent -#define GETHOSTBYNAME_R_BUFSIZE 16384 - -/* On Windows systems specify a routine to determine the MAC address of the Ethernet adapter */ -/* Special handling for MinGW which does not yet (as of MinGW 2.0) support snmp.h */ -#if defined(HAVE_WINDOWS_H) && !defined(__MINGW32__) - -#include - -// Visual C++ prior to version 6 declared different type names -// in , so we need to define a mapping -#if _MSC_VER < 1200 -typedef RFC1157VarBind SnmpVarBind; -typedef RFC1157VarBindList SnmpVarBindList; -typedef AsnInteger AsnInteger32; -#define SNMP_PDU_GETNEXT ASN_RFC1157_GETNEXTREQUEST -#endif - - -typedef int(WINAPI *pSnmpUtilOidCpy) ( - OUT AsnObjectIdentifier *pOidDst, - IN AsnObjectIdentifier *pOidSrc); +#ifdef _WIN32 -typedef int(WINAPI *pSnmpUtilOidNCmp) ( - IN AsnObjectIdentifier *pOid1, - IN AsnObjectIdentifier *pOid2, - IN UINT nSubIds); - -typedef void(WINAPI *pSnmpUtilVarBindFree) ( - IN OUT SnmpVarBind *pVb); - -typedef bool(WINAPI *pSnmpExtensionInit) ( - IN DWORD dwTimeZeroReference, - OUT HANDLE *hPollForTrapEvent, - OUT AsnObjectIdentifier *supportedView); - -typedef bool(WINAPI *pSnmpExtensionQuery) ( - IN BYTE requestType, - IN OUT SnmpVarBindList *variableBindings, - OUT AsnInteger32 *errorStatus, - OUT AsnInteger32 *errorIndex); - -typedef struct _ASTAT_ -{ - ADAPTER_STATUS adapt; - NAME_BUFFER NameBuff[30]; -} ASTAT, *PASTAT; - -/* get the MAC address of the (first) Ethernet adapter (6 bytes) */ -static unsigned char *getMACAddress(unsigned char buffer[6]) +/* On Windows systems specify a routine to determine the MAC address of the Ethernet adapter. + * This implementation uses Win32 system calls available on Windows 2000 and newer. + * A different implementation supporting Windows 95 was used in DCMTK releases up to 3.6.0, + * but that implementation does not work reliably anymore on Windows 10. + */ +static IP_ADAPTER_INFO* getMACAddresses(OFVector& buffer) { - OFBool success = OFFalse; - /* init return variable */ - memzero(buffer, 6 * sizeof(unsigned char)); - NCB ncb; - memzero(&ncb, sizeof(ncb)); - /* reset the LAN adapter */ - ncb.ncb_command = NCBRESET; - /* it is considered bad practice to hardcode the LANA number (should enumerate - adapters first), but at least this approach also works on Windows 9x */ - ncb.ncb_lana_num = 0; - if (Netbios(&ncb) == NRC_GOODRET) - { - ASTAT Adapter; - /* prepare to get the adapter status block */ - memzero(&ncb, sizeof(ncb)); - ncb.ncb_command = NCBASTAT; - /* it is considered bad practice to hardcode the LANA number (should enumerate - adapters first), but at least this approach also works on Windows 9x */ - ncb.ncb_lana_num = 0; - strcpy((char *)ncb.ncb_callname, "*"); - ncb.ncb_buffer = (unsigned char *)&Adapter; - ncb.ncb_length = sizeof(Adapter); - /* get the adapter's info */ - if (Netbios(&ncb) == 0) - { - /* store the MAC address */ - buffer[0] = Adapter.adapt.adapter_address[0]; - buffer[1] = Adapter.adapt.adapter_address[1]; - buffer[2] = Adapter.adapt.adapter_address[2]; - buffer[3] = Adapter.adapt.adapter_address[3]; - buffer[4] = Adapter.adapt.adapter_address[4]; - buffer[5] = Adapter.adapt.adapter_address[5]; - success = OFTrue; - } - } - /* check whether NetBIOS routines succeeded, if not try the SNMP approach */ - if (!success) - { - HINSTANCE m_hInst1, m_hInst2; - /* load the "SNMP Utility Library" dll and get the addresses of the functions necessary */ - m_hInst1 = LoadLibrary("snmpapi.dll"); - if (m_hInst1 >= (HINSTANCE)HINSTANCE_ERROR) - { - pSnmpUtilOidCpy m_Copy = (pSnmpUtilOidCpy)GetProcAddress(m_hInst1, "SnmpUtilOidCpy"); - pSnmpUtilOidNCmp m_Compare = (pSnmpUtilOidNCmp)GetProcAddress(m_hInst1, "SnmpUtilOidNCmp"); - pSnmpUtilVarBindFree m_BindFree = (pSnmpUtilVarBindFree)GetProcAddress(m_hInst1, "SnmpUtilVarBindFree"); - /* load the "SNMP Internet MIB" dll and get the addresses of the functions necessary */ - m_hInst2 = LoadLibrary("inetmib1.dll"); - if (m_hInst2 >= (HINSTANCE)HINSTANCE_ERROR) - { - HANDLE PollForTrapEvent; - AsnObjectIdentifier SupportedView; - UINT OID_ifEntryType[] = {1, 3, 6, 1, 2, 1, 2, 2, 1, 3}; - UINT OID_ifEntryNum[] = {1, 3, 6, 1, 2, 1, 2, 1}; - UINT OID_ipMACEntAddr[] = {1, 3, 6, 1, 2, 1, 2, 2, 1, 6}; - AsnObjectIdentifier MIB_ifMACEntAddr = {sizeof(OID_ipMACEntAddr) / sizeof(UINT), OID_ipMACEntAddr}; - AsnObjectIdentifier MIB_ifEntryType = {sizeof(OID_ifEntryType) / sizeof(UINT), OID_ifEntryType}; - SnmpVarBindList varBindList; - SnmpVarBind varBind[2]; - AsnInteger32 errorStatus; - AsnInteger32 errorIndex; - AsnObjectIdentifier MIB_NULL = {0, 0}; - int ret; - int dtmp; - int j = 0; - pSnmpExtensionInit m_Init = (pSnmpExtensionInit)GetProcAddress(m_hInst2, "SnmpExtensionInit"); - pSnmpExtensionQuery m_Query = (pSnmpExtensionQuery)GetProcAddress(m_hInst2, "SnmpExtensionQuery"); - m_Init(GetTickCount(), &PollForTrapEvent, &SupportedView); - /* initialize the variable list to be retrieved by m_Query */ - varBindList.list = varBind; - varBind[0].name = MIB_NULL; - varBind[1].name = MIB_NULL; - varBindList.len = 2; - /* copy in the OID of ifType, the type of interface */ - m_Copy(&varBind[0].name, &MIB_ifEntryType); - /* copy in the OID of ifPhysAddress, the address */ - m_Copy(&varBind[1].name, &MIB_ifMACEntAddr); - do { - /* Submit the query. Responses will be loaded into varBindList. - We can expect this call to succeed a # of times corresponding - to the # of adapters reported to be in the system */ - ret = m_Query(SNMP_PDU_GETNEXT, &varBindList, &errorStatus, &errorIndex); - if (!ret) - ret = 1; - else - { - /* confirm that the proper type has been returned */ - ret = m_Compare(&varBind[0].name, &MIB_ifEntryType, MIB_ifEntryType.idLength); - } - if (!ret) - { - j++; - dtmp = varBind[0].value.asnValue.number; - /* type 6 describes ethernet interfaces */ - if (dtmp == 6) - { - /* confirm that we have an address here */ - ret = m_Compare(&varBind[1].name, &MIB_ifMACEntAddr,MIB_ifMACEntAddr.idLength); - if ((!ret) && (varBind[1].value.asnValue.address.stream != NULL)) - { - if ((varBind[1].value.asnValue.address.stream[0] == 0x44) && - (varBind[1].value.asnValue.address.stream[1] == 0x45) && - (varBind[1].value.asnValue.address.stream[2] == 0x53) && - (varBind[1].value.asnValue.address.stream[3] == 0x54) && - (varBind[1].value.asnValue.address.stream[4] == 0x00)) - { - /* ignore all dial-up networking adapters */ - continue; - } - if ((varBind[1].value.asnValue.address.stream[0] == 0x00) && - (varBind[1].value.asnValue.address.stream[1] == 0x00) && - (varBind[1].value.asnValue.address.stream[2] == 0x00) && - (varBind[1].value.asnValue.address.stream[3] == 0x00) && - (varBind[1].value.asnValue.address.stream[4] == 0x00) && - (varBind[1].value.asnValue.address.stream[5] == 0x00)) - { - /* ignore NULL addresses returned by other network interfaces */ - continue; - } - /* store the MAC address */ - buffer[0] = varBind[1].value.asnValue.address.stream[0]; - buffer[1] = varBind[1].value.asnValue.address.stream[1]; - buffer[2] = varBind[1].value.asnValue.address.stream[2]; - buffer[3] = varBind[1].value.asnValue.address.stream[3]; - buffer[4] = varBind[1].value.asnValue.address.stream[4]; - buffer[5] = varBind[1].value.asnValue.address.stream[5]; - ret = 1; // we found an address -> exit - } - } - } - } while (!ret); /* Stop only on an error. An error will occur when we - go exhaust the list of interfaces to be examined */ - FreeLibrary(m_hInst2); - /* free the bindings */ - m_BindFree(&varBind[0]); - m_BindFree(&varBind[1]); - } - FreeLibrary(m_hInst1); - } - } - return buffer; + // get adapter info using OFVector to allocate memory + DWORD bufferSize = 0; + DWORD status = GetAdaptersInfo(OFnullptr, &bufferSize); + if (status == ERROR_BUFFER_OVERFLOW) + { + buffer.resize(bufferSize); + status = GetAdaptersInfo(OFreinterpret_cast(IP_ADAPTER_INFO*, &*buffer.begin()), &bufferSize); + } + if (status == ERROR_SUCCESS) + return OFreinterpret_cast(IP_ADAPTER_INFO*, &*buffer.begin()); + // print out the error message for debugging + OFString message; + LPVOID errBuf = OFnullptr; + if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + OFnullptr, status, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), OFreinterpret_cast(LPTSTR, &errBuf), 0, OFnullptr) > 0) + { + message = OFstatic_cast(const char*, errBuf); + // remove "\r\n" + if (message.size() >= 2 && message.substr(message.length() - 2) == "\r\n") + message = message.substr(0, message.length() - 2); + } + LocalFree(errBuf); + if (!message.empty()) + { + DCMDATA_WARN("GetAdaptersInfo() failed with the error: '" << message << '\''); + } + else + { + DCMDATA_WARN("GetAdaptersInfo() failed with an unknown error"); + } + // a null pointer indicates that no adapter is available + return OFnullptr; } #endif @@ -1627,12 +1508,9 @@ static long gethostid(void) char name[1024]; char **p = NULL; struct in_addr in; -#ifdef HAVE_WINSOCK_H - WSAData winSockData; - /* we need at least version 1.1 */ - WORD winSockVersionNeeded = MAKEWORD(1, 1); - WSAStartup(winSockVersionNeeded, &winSockData); -#endif + + OFStandard::initializeNetwork(); + /* ** Define the hostid to be the system's main TCP/IP address. ** This is not perfect but it is better than nothing (i.e. using zero) @@ -1648,9 +1526,8 @@ static long gethostid(void) } } } -#ifdef HAVE_WINSOCK_H - WSACleanup(); -#endif + + OFStandard::shutdownNetwork(); #endif /* defined(HAVE_GETHOSTNAME) && defined(HAVE_GETHOSTBYNAME) */ /* on Windows systems determine some system specific information (e.g. MAC address) */ #ifdef HAVE_WINDOWS_H @@ -1674,11 +1551,12 @@ static long gethostid(void) } /* concatenate the host specific elements and compute a 32-bit checksum */ crc.addBlock(&result /*ip address*/, OFstatic_cast(unsigned long, sizeof(result))); -#ifndef __MINGW32__ - /* on MinGW, getMacAddress() is not yet available. */ - unsigned char buffer[6]; - crc.addBlock(getMACAddress(buffer), sizeof(buffer)); -#endif + // add the MAC addresses of all adapters + { + OFVector buffer; + for (IP_ADAPTER_INFO* adapterInfo = getMACAddresses(buffer); adapterInfo; adapterInfo = adapterInfo->Next) + crc.addBlock(adapterInfo->Address, adapterInfo->AddressLength); + } crc.addBlock(&serialNumber, OFstatic_cast(unsigned long, sizeof(serialNumber))); crc.addBlock(&systemInfo.wProcessorLevel, OFstatic_cast(unsigned long, sizeof(systemInfo.wProcessorLevel))); crc.addBlock(&systemInfo.wProcessorRevision, OFstatic_cast(unsigned long, sizeof(systemInfo.wProcessorRevision))); diff --git a/dcmdata/libsrc/dcvr.cc b/dcmdata/libsrc/dcvr.cc index 9765c9b3..1c9e4ca5 100644 --- a/dcmdata/libsrc/dcvr.cc +++ b/dcmdata/libsrc/dcvr.cc @@ -77,15 +77,16 @@ void dcmDisableGenerationOfNewVRs() #define DCMVR_PROP_EXTENDEDLENGTHENCODING 0x04 #define DCMVR_PROP_ISASTRING 0x08 #define DCMVR_PROP_ISAFFECTEDBYCHARSET 0x10 +#define DCMVR_PROP_ISLENGTHINCHAR 0x20 struct DcmVREntry { DcmEVR vr; // Enumeration Value of Value representation const char* vrName; // Name of Value representation const OFString* delimiterChars; // Delimiter characters, switch to default charset size_t fValWidth; // Length of minimal unit, used for swapping - int propertyFlags; // Normal, internal, non-standard vr - Uint32 minValueLength; // Minimum length of a single value (bytes) - Uint32 maxValueLength; // Maximum length of a single value (bytes) + int propertyFlags; // Normal, internal, non-standard VR, etc. + Uint32 minValueLength; // Minimum length of a single value (bytes or characters) + Uint32 maxValueLength; // Maximum length of a single value (bytes or characters) }; static const OFString noDelimiters; // none @@ -104,26 +105,26 @@ static const DcmVREntry DcmVRDict[] = { { EVR_FL, "FL", &noDelimiters, sizeof(Float32), DCMVR_PROP_NONE, 4, 4 }, { EVR_FD, "FD", &noDelimiters, sizeof(Float64), DCMVR_PROP_NONE, 8, 8 }, { EVR_IS, "IS", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING, 0, 12 }, - { EVR_LO, "LO", &bsDelimiter, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 64 }, - { EVR_LT, "LT", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 10240 }, + { EVR_LO, "LO", &bsDelimiter, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET | DCMVR_PROP_ISLENGTHINCHAR, 0, 64 }, + { EVR_LT, "LT", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET | DCMVR_PROP_ISLENGTHINCHAR, 0, 10240 }, { EVR_OB, "OB", &noDelimiters, sizeof(Uint8), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength }, - { EVR_OD, "OD", &noDelimiters, sizeof(Float64), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength }, - { EVR_OF, "OF", &noDelimiters, sizeof(Float32), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength }, + { EVR_OD, "OD", &noDelimiters, sizeof(Float64), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, 4294967288U }, + { EVR_OF, "OF", &noDelimiters, sizeof(Float32), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, 4294967292U }, { EVR_OL, "OL", &noDelimiters, sizeof(Uint32), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength }, { EVR_OW, "OW", &noDelimiters, sizeof(Uint16), DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength }, - { EVR_PN, "PN", &pnDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 64 }, - { EVR_SH, "SH", &bsDelimiter, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 16 }, + { EVR_PN, "PN", &pnDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET | DCMVR_PROP_ISLENGTHINCHAR, 0, 64 }, + { EVR_SH, "SH", &bsDelimiter, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET | DCMVR_PROP_ISLENGTHINCHAR, 0, 16 }, { EVR_SL, "SL", &noDelimiters, sizeof(Sint32), DCMVR_PROP_NONE, 4, 4 }, { EVR_SQ, "SQ", &noDelimiters, 0, DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength }, { EVR_SS, "SS", &noDelimiters, sizeof(Sint16), DCMVR_PROP_NONE, 2, 2 }, - { EVR_ST, "ST", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 1024 }, + { EVR_ST, "ST", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET | DCMVR_PROP_ISLENGTHINCHAR, 0, 1024 }, { EVR_TM, "TM", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING, 0, 16 }, - { EVR_UC, "UC", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, DCM_UndefinedLength }, + { EVR_UC, "UC", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 4294967294U }, { EVR_UI, "UI", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING, 0, 64 }, { EVR_UL, "UL", &noDelimiters, sizeof(Uint32), DCMVR_PROP_NONE, 4, 4 }, - { EVR_UR, "UR", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING|DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength }, + { EVR_UR, "UR", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING|DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, 4294967294U }, { EVR_US, "US", &noDelimiters, sizeof(Uint16), DCMVR_PROP_NONE, 2, 2 }, - { EVR_UT, "UT", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, DCM_UndefinedLength }, + { EVR_UT, "UT", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 4294967294U }, { EVR_ox, "ox", &noDelimiters, sizeof(Uint8), DCMVR_PROP_NONSTANDARD | DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength }, { EVR_xs, "xs", &noDelimiters, sizeof(Uint16), DCMVR_PROP_NONSTANDARD, 2, 2 }, { EVR_lt, "lt", &noDelimiters, sizeof(Uint16), DCMVR_PROP_NONSTANDARD | DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, DCM_UndefinedLength }, @@ -466,3 +467,10 @@ DcmVR::getDelimiterChars() const { return *DcmVRDict[vr].delimiterChars; } + +/* returns true if VR length is in char */ +OFBool +DcmVR::isLengthInChar() const +{ + return (DcmVRDict[vr].propertyFlags & DCMVR_PROP_ISLENGTHINCHAR) ? OFTrue : OFFalse; +} diff --git a/dcmdata/libsrc/dcvrae.cc b/dcmdata/libsrc/dcvrae.cc index 8d247acf..47822406 100644 --- a/dcmdata/libsrc/dcvrae.cc +++ b/dcmdata/libsrc/dcvrae.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2010, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,6 +22,7 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmdata/dcvrae.h" +#include "dcmtk/dcmdata/dcmatch.h" #define MAX_AE_LENGTH 16 @@ -113,3 +114,14 @@ OFCondition DcmApplicationEntity::checkStringValue(const OFString &value, { return DcmByteString::checkStringValue(value, vm, "ae", 13, MAX_AE_LENGTH); } + + +OFBool DcmApplicationEntity::matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching) const +{ + if (enableWildCardMatching) + return DcmAttributeMatching::wildCardMatching(key.c_str(), key.length(), candidate.c_str(), candidate.length()); + else + return DcmByteString::matches(key, candidate, OFFalse); +} diff --git a/dcmdata/libsrc/dcvrat.cc b/dcmdata/libsrc/dcvrat.cc index afca44ae..8efb5d6e 100644 --- a/dcmdata/libsrc/dcvrat.cc +++ b/dcmdata/libsrc/dcvrat.cc @@ -76,8 +76,19 @@ int DcmAttributeTag::compare(const DcmElement& rhs) const myThis = OFconst_cast(DcmAttributeTag*, this); myRhs = OFstatic_cast(DcmAttributeTag*, OFconst_cast(DcmElement*, &rhs)); - /* iterate over all components and test equality */ + /* compare VMs */ unsigned long thisVM = myThis->getVM(); + unsigned long rhsVM = myRhs->getVM(); + if (thisVM < rhsVM) + { + return -1; + } + else if (thisVM > rhsVM) + { + return 1; + } + + /* iterate over all components and test equality */ for (unsigned long count = 0; count < thisVM; count++) { DcmTagKey val; @@ -96,24 +107,9 @@ int DcmAttributeTag::compare(const DcmElement& rhs) const } /* otherwise they are equal, continue comparison */ } - else - { - break; // values equal until this point (rhs shorter) - } } } - /* we get here if all values are equal. Now look at the number of components. */ - unsigned long rhsVM = myRhs->getVM(); - if (thisVM < rhsVM) - { - return -1; - } - else if (thisVM > rhsVM) - { - return 1; - } - /* all values as well as VM equal: objects are equal */ return 0; } diff --git a/dcmdata/libsrc/dcvrcs.cc b/dcmdata/libsrc/dcvrcs.cc index c7718c78..14c4a129 100644 --- a/dcmdata/libsrc/dcvrcs.cc +++ b/dcmdata/libsrc/dcvrcs.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2010, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,6 +26,7 @@ #include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/dcmdata/dcvrcs.h" +#include "dcmtk/dcmdata/dcmatch.h" #define MAX_CS_LENGTH 16 @@ -142,3 +143,14 @@ OFCondition DcmCodeString::checkStringValue(const OFString &value, { return DcmByteString::checkStringValue(value, vm, "cs", 10, MAX_CS_LENGTH); } + + +OFBool DcmCodeString::matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching) const +{ + if (enableWildCardMatching) + return DcmAttributeMatching::wildCardMatching(key.c_str(), key.length(), candidate.c_str(), candidate.length()); + else + return DcmByteString::matches(key, candidate, OFFalse); +} diff --git a/dcmdata/libsrc/dcvrda.cc b/dcmdata/libsrc/dcvrda.cc index fdead9bc..be4bc118 100644 --- a/dcmdata/libsrc/dcvrda.cc +++ b/dcmdata/libsrc/dcvrda.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2015, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,9 +22,11 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmdata/dcvrda.h" +#include "dcmtk/dcmdata/dcvrtm.h" #define INCLUDE_CSTDIO #include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/dcmdata/dcmatch.h" // ******************************** @@ -331,3 +333,34 @@ OFCondition DcmDate::checkStringValue(const OFString &value, } return result; } + +OFBool DcmDate::matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching) const +{ + OFstatic_cast(void,enableWildCardMatching); + return DcmAttributeMatching::rangeMatchingDate(key.c_str(), key.length(), candidate.c_str(), candidate.length()); +} + +OFBool DcmDate::combinationMatches(const DcmElement& keySecond, + const DcmElement& candidateFirst, + const DcmElement& candidateSecond) const +{ + if (keySecond.ident() == EVR_TM && candidateFirst.ident() == EVR_DA && candidateSecond.ident() == EVR_TM) + { + // do many const casts, but we do not modify the value, I promise... + DcmDate& queryDate = OFconst_cast(DcmDate&, *this); + DcmDate& candidateDate = OFconst_cast(DcmDate&, OFstatic_cast(const DcmDate&, candidateFirst)); + DcmTime& queryTime = OFconst_cast(DcmTime&, OFstatic_cast(const DcmTime&, keySecond)); + DcmTime& candidateTime = OFconst_cast(DcmTime&, OFstatic_cast(const DcmTime&, candidateSecond)); + OFString a0, a1, b0, b1; + // no support for VM>1 so far! + return queryDate.getOFString( a0, 0, OFTrue ).good() && queryTime.getOFString( a1, 0, OFTrue ).good() && + candidateDate.getOFString( b0, 0, OFTrue ).good() && candidateTime.getOFString( b1, 0, OFTrue ).good() && + DcmAttributeMatching::rangeMatchingDateTime + ( + a0.c_str(), a0.length(), a1.c_str(), a1.length(), b0.c_str(), b0.length(), b1.c_str(), b1.length() + ); + } + return OFFalse; +} diff --git a/dcmdata/libsrc/dcvrdt.cc b/dcmdata/libsrc/dcvrdt.cc index a9175560..43c1e0ec 100644 --- a/dcmdata/libsrc/dcvrdt.cc +++ b/dcmdata/libsrc/dcvrdt.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2015, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,6 +24,7 @@ #include "dcmtk/dcmdata/dcvrdt.h" #include "dcmtk/dcmdata/dcvrda.h" #include "dcmtk/dcmdata/dcvrtm.h" +#include "dcmtk/dcmdata/dcmatch.h" #include "dcmtk/ofstd/ofstring.h" #include "dcmtk/ofstd/ofstd.h" @@ -399,3 +400,12 @@ OFCondition DcmDateTime::checkStringValue(const OFString &value, } return result; } + + +OFBool DcmDateTime::matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching) const +{ + OFstatic_cast(void,enableWildCardMatching); + return DcmAttributeMatching::rangeMatchingDateTime(key.c_str(), key.length(), candidate.c_str(), candidate.length()); +} diff --git a/dcmdata/libsrc/dcvrfd.cc b/dcmdata/libsrc/dcvrfd.cc index dc6e9f37..79b49a95 100644 --- a/dcmdata/libsrc/dcvrfd.cc +++ b/dcmdata/libsrc/dcvrfd.cc @@ -78,8 +78,19 @@ int DcmFloatingPointDouble::compare(const DcmElement& rhs) const myThis = OFconst_cast(DcmFloatingPointDouble*, this); myRhs = OFstatic_cast(DcmFloatingPointDouble*, OFconst_cast(DcmElement*, &rhs)); - /* iterate over all components and test equality */ + /* check whether VMs are equal */ unsigned long thisVM = myThis->getVM(); + unsigned long rhsVM = myRhs->getVM(); + if (thisVM < rhsVM) + { + return -1; + } + else if (thisVM > rhsVM) + { + return 1; + } + + /* iterate over all components and test equality */ for (unsigned long count = 0; count < thisVM; count++) { Float64 val = 0; @@ -97,24 +108,9 @@ int DcmFloatingPointDouble::compare(const DcmElement& rhs) const return -1; } } - else - { - break; // values equal until this point (rhs shorter) - } } } - /* we get here if all values are equal. Now look at the number of components */ - unsigned long rhsVM = myRhs->getVM(); - if (thisVM < rhsVM) - { - return -1; - } - else if (thisVM > rhsVM) - { - return 1; - } - /* all values as well as VM equal: objects are equal */ return 0; } @@ -365,3 +361,23 @@ OFCondition DcmFloatingPointDouble::verify(const OFBool autocorrect) errorFlag = EC_Normal; return errorFlag; } + + +OFBool DcmFloatingPointDouble::matches(const DcmElement& candidate, + const OFBool enableWildCardMatching) const +{ + OFstatic_cast(void,enableWildCardMatching); + if (ident() == candidate.ident()) + { + // some const casts to call the getter functions, I do not modify the values, I promise! + DcmFloatingPointDouble& key = OFconst_cast(DcmFloatingPointDouble&,*this); + DcmElement& can = OFconst_cast(DcmElement&,candidate); + Float64 a, b; + for( unsigned long ui = 0; ui < key.getVM(); ++ui ) + for( unsigned long uj = 0; uj < can.getVM(); ++uj ) + if( key.getFloat64( a, ui ).good() && can.getFloat64( b, uj ).good() && a == b ) + return OFTrue; + return key.getVM() == 0; + } + return OFFalse; +} diff --git a/dcmdata/libsrc/dcvrfl.cc b/dcmdata/libsrc/dcvrfl.cc index 92348264..9c137d69 100644 --- a/dcmdata/libsrc/dcvrfl.cc +++ b/dcmdata/libsrc/dcvrfl.cc @@ -78,8 +78,19 @@ int DcmFloatingPointSingle::compare(const DcmElement& rhs) const myThis = OFconst_cast(DcmFloatingPointSingle*, this); myRhs = OFstatic_cast(DcmFloatingPointSingle*, OFconst_cast(DcmElement*, &rhs)); - // iterate over all components and test equality */ + /* check whether VMs are equal */ unsigned long thisVM = myThis->getVM(); + unsigned long rhsVM = myRhs->getVM(); + if (thisVM < rhsVM) + { + return -1; + } + else if (thisVM > rhsVM) + { + return 1; + } + + // iterate over all components and test equality */ for (unsigned long count = 0; count < thisVM; count++) { Float32 val = 0; @@ -97,24 +108,9 @@ int DcmFloatingPointSingle::compare(const DcmElement& rhs) const return -1; } } - else - { - break; // values equal until this point (rhs shorter) - } } } - /* we get here if all values are equal. Now look at the number of components. */ - unsigned long rhsVM = myRhs->getVM(); - if (thisVM < rhsVM) - { - return -1; - } - else if (thisVM > rhsVM) - { - return 1; - } - /* all values as well as VM equal: objects are equal */ return 0; } @@ -366,3 +362,23 @@ OFCondition DcmFloatingPointSingle::verify(const OFBool autocorrect) errorFlag = EC_Normal; return errorFlag; } + + +OFBool DcmFloatingPointSingle::matches(const DcmElement& candidate, + const OFBool enableWildCardMatching) const +{ + OFstatic_cast(void,enableWildCardMatching); + if (ident() == candidate.ident()) + { + // some const casts to call the getter functions, I do not modify the values, I promise! + DcmFloatingPointSingle& key = OFconst_cast(DcmFloatingPointSingle&,*this); + DcmElement& can = OFconst_cast(DcmElement&,candidate); + Float32 a, b; + for( unsigned long ui = 0; ui < key.getVM(); ++ui ) + for( unsigned long uj = 0; uj < can.getVM(); ++uj ) + if( key.getFloat32( a, ui ).good() && can.getFloat32( b, uj ).good() && a == b ) + return OFTrue; + return key.getVM() == 0; + } + return OFFalse; +} diff --git a/dcmdata/libsrc/dcvrlo.cc b/dcmdata/libsrc/dcvrlo.cc index c34a6230..2840cdbd 100644 --- a/dcmdata/libsrc/dcvrlo.cc +++ b/dcmdata/libsrc/dcvrlo.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -86,7 +86,8 @@ OFCondition DcmLongString::checkValue(const OFString &vm, { OFString charset; /* try to determine the value of the SpecificCharacterSet element */ - getSpecificCharacterSet(charset); + if (getSpecificCharacterSet(charset) == EC_CorruptedData) + charset = "UNKNOWN"; l_error = DcmLongString::checkStringValue(strVal, vm, charset); } return l_error; diff --git a/dcmdata/libsrc/dcvrlt.cc b/dcmdata/libsrc/dcvrlt.cc index 6c1969b1..da8f71d7 100644 --- a/dcmdata/libsrc/dcvrlt.cc +++ b/dcmdata/libsrc/dcvrlt.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2013, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -84,7 +84,8 @@ OFCondition DcmLongText::checkValue(const OFString & /*vm*/, { OFString charset; /* try to determine the value of the SpecificCharacterSet element */ - getSpecificCharacterSet(charset); + if (getSpecificCharacterSet(charset) == EC_CorruptedData) + charset = "UNKNOWN"; l_error = DcmLongText::checkStringValue(strVal, charset); } return l_error; diff --git a/dcmdata/libsrc/dcvrobow.cc b/dcmdata/libsrc/dcvrobow.cc index 00e33fb3..6f0bc315 100644 --- a/dcmdata/libsrc/dcvrobow.cc +++ b/dcmdata/libsrc/dcvrobow.cc @@ -90,37 +90,22 @@ int DcmOtherByteOtherWord::compare(const DcmElement& rhs) const myThis = OFconst_cast(DcmOtherByteOtherWord*, this); myRhs = OFstatic_cast(DcmOtherByteOtherWord*, OFconst_cast(DcmElement*, &rhs)); + /* check equality of length */ unsigned long thisLength = myThis->getLength(); unsigned long rhsLength= myRhs->getLength(); - Uint8* thisData = OFstatic_cast(Uint8*, myThis->getValue()); - Uint8* rhsData = OFstatic_cast(Uint8*, myRhs->getValue()); - unsigned long maxLength = (thisLength > rhsLength) ? rhsLength : thisLength; - /* iterate over all components and test equality */ - for (unsigned long count = 0; count < maxLength; count++) - { - if (thisData[count] > rhsData[count]) - { - return 1; - } - else if (thisData[count] < rhsData[count]) - { - return -1; - } - /* otherwise they are equal, continue comparison */ - } - - /* we get here if all values are equal. Now look at the number of components. */ if (thisLength < rhsLength) { - return -1; + return -1; } else if (thisLength > rhsLength) { - return 1; + return 1; } - - /* all values as well as VM equal: objects are equal */ - return 0; + /* finally, check equality of values. getValue() makes sure byte + * swapping is applied as necessary. */ + void* thisData = myThis->getValue(); + void* rhsData = myRhs->getValue(); + return memcmp(thisData, rhsData, thisLength); } diff --git a/dcmdata/libsrc/dcvrpn.cc b/dcmdata/libsrc/dcvrpn.cc index 2b88b0b9..3424ccc6 100644 --- a/dcmdata/libsrc/dcvrpn.cc +++ b/dcmdata/libsrc/dcvrpn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -89,7 +89,8 @@ OFCondition DcmPersonName::checkValue(const OFString &vm, { OFString charset; /* try to determine the value of the SpecificCharacterSet element */ - getSpecificCharacterSet(charset); + if (getSpecificCharacterSet(charset) == EC_CorruptedData) + charset = "UNKNOWN"; l_error = DcmPersonName::checkStringValue(strVal, vm, charset); } return l_error; diff --git a/dcmdata/libsrc/dcvrpobw.cc b/dcmdata/libsrc/dcvrpobw.cc index 42c2ba63..1af885d0 100644 --- a/dcmdata/libsrc/dcvrpobw.cc +++ b/dcmdata/libsrc/dcvrpobw.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2010, OFFIS e.V. + * Copyright (C) 1997-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -58,6 +58,45 @@ DcmPolymorphOBOW &DcmPolymorphOBOW::operator=(const DcmPolymorphOBOW & obj) return *this; } +int DcmPolymorphOBOW::compare(const DcmElement& rhs) const +{ + /* check tag and VR */ + int result = DcmElement::compare(rhs); + if (result != 0) + { + return result; + } + + /* cast away constness (dcmdata is not const correct...) */ + DcmPolymorphOBOW* myThis = NULL; + DcmPolymorphOBOW* myRhs = NULL; + myThis = OFconst_cast(DcmPolymorphOBOW*, this); + myRhs = OFstatic_cast(DcmPolymorphOBOW*, OFconst_cast(DcmElement*, &rhs)); + + /* check whether length is the same */ + Uint32 myLength = myThis->getLength(); + Uint32 rhsLength = myRhs->getLength(); + if (myLength < rhsLength) + return -1; + else if (myLength > rhsLength) + return 1; + /* finally check whether values are the same */ + else + { + // Get values, always compare in Little Endian byte order (only relevant for OW) + void* myValue = myThis->getValue(EBO_LittleEndian); + void* rhsValue = myRhs->getValue(EBO_LittleEndian); + int result = memcmp(myValue, rhsValue, myLength); + if (result < 0) + return -1; + else if (result > 0) + return 1; + else + return 0; + } + /* we never get here */ +} + OFCondition DcmPolymorphOBOW::copyFrom(const DcmObject& rhs) { if (this != &rhs) @@ -251,16 +290,32 @@ OFCondition DcmPolymorphOBOW::write( DcmXfer oXferSyn(oxfer); if (getTransferState() == ERW_init) { - if (getTag().getEVR() == EVR_OB && oXferSyn.isImplicitVR() && getByteOrder() == EBO_BigEndian) + if (getTag().getEVR() == EVR_OB && oXferSyn.isImplicitVR()) { - // VR is OB and it will be written as OW in LittleEndianImplicit. - setTagVR(EVR_OW); - if (currentVR == EVR_OB) setByteOrder(EBO_LittleEndian); - currentVR = EVR_OB; - changeVR = OFTrue; + // This element was read or created as OB, but we are writing in + // implicit VR transfer syntax (which always uses OW). Therefore, + // change the VR associated with the tag to OW. + setTagVR(EVR_OW); + + // If the data is currently in OB representation in memory, + // adjust the VR to OW and update the current byte order. + // OB data is equivalent to OW data in little endian byte order. + if (currentVR == EVR_OB) + { + setByteOrder(EBO_LittleEndian); + currentVR = EVR_OW; + } + + // remember that we have changed the VR associated with the tag + changeVR = OFTrue; } + else if (getTag().getEVR() == EVR_OW && currentVR == EVR_OB) { + // the element was originally read/created as OW + // but is currently in OB format. Change back to OW. + + // OB data is equivalent to OW data in little endian byte order. setByteOrder(EBO_LittleEndian); currentVR = EVR_OW; } @@ -268,9 +323,8 @@ OFCondition DcmPolymorphOBOW::write( errorFlag = DcmOtherByteOtherWord::write(outStream, oxfer, enctype, wcache); if (getTransferState() == ERW_ready && changeVR) { - // VR must be OB again. No Swapping is needed since the written - // transfer syntax was LittleEndianImplicit and so no swapping - // took place. + // Change the VR associated with the tag + // (not the current VR!) back from OW to OB setTagVR(EVR_OB); } return errorFlag; @@ -285,16 +339,32 @@ OFCondition DcmPolymorphOBOW::writeSignatureFormat( DcmXfer oXferSyn(oxfer); if (getTransferState() == ERW_init) { - if (getTag().getEVR() == EVR_OB && oXferSyn.isImplicitVR() && getByteOrder() == EBO_BigEndian) + if (getTag().getEVR() == EVR_OB && oXferSyn.isImplicitVR()) { - // VR is OB and it will be written as OW in LittleEndianImplicit. - setTagVR(EVR_OW); - if (currentVR == EVR_OB) setByteOrder(EBO_LittleEndian); - currentVR = EVR_OB; - changeVR = OFTrue; + // This element was read or created as OB, but we are writing in + // implicit VR transfer syntax (which always uses OW). Therefore, + // change the VR associated with the tag to OW. + setTagVR(EVR_OW); + + // If the data is currently in OB representation in memory, + // adjust the VR to OW and update the current byte order. + // OB data is equivalent to OW data in little endian byte order. + if (currentVR == EVR_OB) + { + setByteOrder(EBO_LittleEndian); + currentVR = EVR_OW; + } + + // remember that we have changed the VR associated with the tag + changeVR = OFTrue; } + else if (getTag().getEVR() == EVR_OW && currentVR == EVR_OB) { + // the element was originally read/created as OW + // but is currently in OB format. Change back to OW. + + // OB data is equivalent to OW data in little endian byte order. setByteOrder(EBO_LittleEndian); currentVR = EVR_OW; } @@ -302,9 +372,8 @@ OFCondition DcmPolymorphOBOW::writeSignatureFormat( errorFlag = DcmOtherByteOtherWord::writeSignatureFormat(outStream, oxfer, enctype, wcache); if (getTransferState() == ERW_ready && changeVR) { - // VR must be OB again. No Swapping is needed since the written - // transfer syntax was LittleEndianImplicit and so no swapping - // took place. + // Change the VR associated with the tag + // (not the current VR!) back from OW to OB setTagVR(EVR_OB); } return errorFlag; diff --git a/dcmdata/libsrc/dcvrsh.cc b/dcmdata/libsrc/dcvrsh.cc index f80c7796..549e7f7f 100644 --- a/dcmdata/libsrc/dcvrsh.cc +++ b/dcmdata/libsrc/dcvrsh.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -86,7 +86,8 @@ OFCondition DcmShortString::checkValue(const OFString &vm, { OFString charset; /* try to determine the value of the SpecificCharacterSet element */ - getSpecificCharacterSet(charset); + if (getSpecificCharacterSet(charset) == EC_CorruptedData) + charset = "UNKNOWN"; l_error = DcmShortString::checkStringValue(strVal, vm, charset); } return l_error; diff --git a/dcmdata/libsrc/dcvrsl.cc b/dcmdata/libsrc/dcvrsl.cc index 16562f9b..3d8e2c1e 100644 --- a/dcmdata/libsrc/dcvrsl.cc +++ b/dcmdata/libsrc/dcvrsl.cc @@ -76,8 +76,19 @@ int DcmSignedLong::compare(const DcmElement& rhs) const myThis = OFconst_cast(DcmSignedLong*, this); myRhs = OFstatic_cast(DcmSignedLong*, OFconst_cast(DcmElement*, &rhs)); - /* iterate over all components and test equality */ + /* check whether VMs are equal */ unsigned long thisVM = myThis->getVM(); + unsigned long rhsVM = myRhs->getVM(); + if (thisVM < rhsVM) + { + return -1; + } + else if (thisVM > rhsVM) + { + return 1; + } + + /* iterate over all components and test equality */ for (unsigned long count = 0; count < thisVM; count++) { Sint32 val = 0; @@ -96,24 +107,9 @@ int DcmSignedLong::compare(const DcmElement& rhs) const } /* otherwise they are equal, continue comparison */ } - else - { - break; // values equal until this point (rhs shorter) - } } } - /* we get here if all values are equal. Now look at the number of components. */ - unsigned long rhsVM = myRhs->getVM(); - if (thisVM < rhsVM) - { - return -1; - } - else if (thisVM > rhsVM) - { - return 1; - } - /* all values as well as VM equal: objects are equal */ return 0; } @@ -369,3 +365,23 @@ OFCondition DcmSignedLong::verify(const OFBool autocorrect) errorFlag = EC_Normal; return errorFlag; } + + +OFBool DcmSignedLong::matches(const DcmElement& candidate, + const OFBool enableWildCardMatching) const +{ + OFstatic_cast(void,enableWildCardMatching); + if (ident() == candidate.ident()) + { + // some const casts to call the getter functions, I do not modify the values, I promise! + DcmSignedLong& key = OFconst_cast(DcmSignedLong&,*this); + DcmElement& can = OFconst_cast(DcmElement&,candidate); + Sint32 a, b; + for( unsigned long ui = 0; ui < key.getVM(); ++ui ) + for( unsigned long uj = 0; uj < can.getVM(); ++uj ) + if( key.getSint32( a, ui ).good() && can.getSint32( b, uj ).good() && a == b ) + return OFTrue; + return key.getVM() == 0; + } + return OFFalse; +} diff --git a/dcmdata/libsrc/dcvrss.cc b/dcmdata/libsrc/dcvrss.cc index 846983d9..918a5409 100644 --- a/dcmdata/libsrc/dcvrss.cc +++ b/dcmdata/libsrc/dcvrss.cc @@ -76,8 +76,19 @@ int DcmSignedShort::compare(const DcmElement& rhs) const myThis = OFconst_cast(DcmSignedShort*, this); myRhs = OFstatic_cast(DcmSignedShort*, OFconst_cast(DcmElement*, &rhs)); - /* iterate over all components and test equality */ + /* check whether VMs are equal */ unsigned long thisVM = myThis->getVM(); + unsigned long rhsVM = myRhs->getVM(); + if (thisVM < rhsVM) + { + return -1; + } + else if (thisVM > rhsVM) + { + return 1; + } + + /* iterate over all components and test equality */ for (unsigned long count = 0; count < thisVM; count++) { Sint16 val = 0; @@ -96,24 +107,9 @@ int DcmSignedShort::compare(const DcmElement& rhs) const } /* otherwise they are equal, continue comparison */ } - else - { - break; // values equal until this point (rhs shorter) - } } } - /* we get here if all values are equal. Now look at the number of components. */ - unsigned long rhsVM = myRhs->getVM(); - if (thisVM < rhsVM) - { - return -1; - } - else if (thisVM > rhsVM) - { - return 1; - } - /* all values as well as VM equal: objects are equal */ return 0; } @@ -354,3 +350,23 @@ OFCondition DcmSignedShort::verify(const OFBool autocorrect) errorFlag = EC_Normal; return errorFlag; } + + +OFBool DcmSignedShort::matches(const DcmElement& candidate, + const OFBool enableWildCardMatching) const +{ + OFstatic_cast(void,enableWildCardMatching); + if (ident() == candidate.ident()) + { + // some const casts to call the getter functions, I do not modify the values, I promise! + DcmSignedShort& key = OFconst_cast(DcmSignedShort&,*this); + DcmElement& can = OFconst_cast(DcmElement&,candidate); + Sint16 a, b; + for( unsigned long ui = 0; ui < key.getVM(); ++ui ) + for( unsigned long uj = 0; uj < can.getVM(); ++uj ) + if( key.getSint16( a, ui ).good() && can.getSint16( b, uj ).good() && a == b ) + return OFTrue; + return key.getVM() == 0; + } + return OFFalse; +} diff --git a/dcmdata/libsrc/dcvrst.cc b/dcmdata/libsrc/dcvrst.cc index 12d5c82f..82acc515 100644 --- a/dcmdata/libsrc/dcvrst.cc +++ b/dcmdata/libsrc/dcvrst.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2013, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -84,7 +84,8 @@ OFCondition DcmShortText::checkValue(const OFString & /*vm*/, { OFString charset; /* try to determine the value of the SpecificCharacterSet element */ - getSpecificCharacterSet(charset); + if (getSpecificCharacterSet(charset) == EC_CorruptedData) + charset = "UNKNOWN"; l_error = DcmShortText::checkStringValue(strVal, charset); } return l_error; diff --git a/dcmdata/libsrc/dcvrtm.cc b/dcmdata/libsrc/dcvrtm.cc index 0f3e1770..c8dbff05 100644 --- a/dcmdata/libsrc/dcvrtm.cc +++ b/dcmdata/libsrc/dcvrtm.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2013, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -27,6 +27,7 @@ #define INCLUDE_CSTDIO #include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/dcmdata/dcmatch.h" #define MAX_TM_LENGTH 16 @@ -484,3 +485,12 @@ OFBool DcmTime::parseFragment(const char* const string, const size_t size, doubl } return OFFalse; } + + +OFBool DcmTime::matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching) const +{ + OFstatic_cast(void,enableWildCardMatching); + return DcmAttributeMatching::rangeMatchingTime(key.c_str(), key.length(), candidate.c_str(), candidate.length()); +} diff --git a/dcmdata/libsrc/dcvruc.cc b/dcmdata/libsrc/dcvruc.cc index aed7031b..d0781b2f 100644 --- a/dcmdata/libsrc/dcvruc.cc +++ b/dcmdata/libsrc/dcvruc.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015, OFFIS e.V. + * Copyright (C) 2015-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -84,7 +84,8 @@ OFCondition DcmUnlimitedCharacters::checkValue(const OFString &vm, { OFString charset; /* try to determine the value of the SpecificCharacterSet element */ - getSpecificCharacterSet(charset); + if (getSpecificCharacterSet(charset) == EC_CorruptedData) + charset = "UNKNOWN"; l_error = DcmUnlimitedCharacters::checkStringValue(strVal, vm, charset); } return l_error; diff --git a/dcmdata/libsrc/dcvrul.cc b/dcmdata/libsrc/dcvrul.cc index 59986be5..3d90a636 100644 --- a/dcmdata/libsrc/dcvrul.cc +++ b/dcmdata/libsrc/dcvrul.cc @@ -77,8 +77,19 @@ int DcmUnsignedLong::compare(const DcmElement& rhs) const myThis = OFconst_cast(DcmUnsignedLong*, this); myRhs = OFstatic_cast(DcmUnsignedLong*, OFconst_cast(DcmElement*, &rhs)); - /* iterate over all components and test equality */ + /* check whether VMs are equal */ unsigned long thisVM = myThis->getVM(); + unsigned long rhsVM = myRhs->getVM(); + if (thisVM < rhsVM) + { + return -1; + } + else if (thisVM > rhsVM) + { + return 1; + } + + /* iterate over all components and test equality */ for (unsigned long count = 0; count < thisVM; count++) { Uint32 val = 0; @@ -96,24 +107,9 @@ int DcmUnsignedLong::compare(const DcmElement& rhs) const return -1; } } - else - { - break; // values equal until this point (rhs shorter) - } } } - /* we get here if all values are equal. Now look at the number of components. */ - unsigned long rhsVM = myRhs->getVM(); - if (thisVM < rhsVM) - { - return -1; - } - else if (thisVM > rhsVM) - { - return 1; - } - /* all values as well as VM equal: objects are equal */ return 0; } @@ -368,3 +364,23 @@ OFCondition DcmUnsignedLong::verify(const OFBool autocorrect) errorFlag = EC_Normal; return errorFlag; } + + +OFBool DcmUnsignedLong::matches(const DcmElement& candidate, + const OFBool enableWildCardMatching) const +{ + OFstatic_cast(void,enableWildCardMatching); + if (ident() == candidate.ident()) + { + // some const casts to call the getter functions, I do not modify the values, I promise! + DcmUnsignedLong& key = OFconst_cast(DcmUnsignedLong&,*this); + DcmElement& can = OFconst_cast(DcmElement&,candidate); + Uint32 a, b; + for( unsigned long ui = 0; ui < key.getVM(); ++ui ) + for( unsigned long uj = 0; uj < can.getVM(); ++uj ) + if( key.getUint32( a, ui ).good() && can.getUint32( b, uj ).good() && a == b ) + return OFTrue; + return key.getVM() == 0; + } + return OFFalse; +} diff --git a/dcmdata/libsrc/dcvrur.cc b/dcmdata/libsrc/dcvrur.cc index 881ca4cf..85b920da 100644 --- a/dcmdata/libsrc/dcvrur.cc +++ b/dcmdata/libsrc/dcvrur.cc @@ -23,6 +23,7 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ #include "dcmtk/dcmdata/dcvrur.h" +#include "dcmtk/dcmdata/dcmatch.h" // ******************************** @@ -123,3 +124,14 @@ OFCondition DcmUniversalResourceIdentifierOrLocator::checkStringValue(const OFSt { return DcmByteString::checkStringValue(value, "" /* vm */, "ur", 19, 0 /* maxLen: no check */); } + + +OFBool DcmUniversalResourceIdentifierOrLocator::matches(const OFString& key, + const OFString& candidate, + const OFBool enableWildCardMatching) const +{ + if (enableWildCardMatching) + return DcmAttributeMatching::wildCardMatching(key.c_str(), key.length(), candidate.c_str(), candidate.length()); + else + return DcmByteString::matches(key, candidate, OFFalse); +} diff --git a/dcmdata/libsrc/dcvrus.cc b/dcmdata/libsrc/dcvrus.cc index e92fd3dc..040f3d24 100644 --- a/dcmdata/libsrc/dcvrus.cc +++ b/dcmdata/libsrc/dcvrus.cc @@ -76,8 +76,19 @@ int DcmUnsignedShort::compare(const DcmElement& rhs) const myThis = OFconst_cast(DcmUnsignedShort*, this); myRhs = OFstatic_cast(DcmUnsignedShort*, OFconst_cast(DcmElement*, &rhs)); - /* iterate over all components and test equality */ + /* check whether VMs are equal */ unsigned long thisVM = myThis->getVM(); + unsigned long rhsVM = myRhs->getVM(); + if (thisVM < rhsVM) + { + return -1; + } + else if (thisVM > rhsVM) + { + return 1; + } + + /* iterate over all components and test equality */ for (unsigned long count = 0; count < thisVM; count++) { Uint16 val = 0; @@ -95,24 +106,9 @@ int DcmUnsignedShort::compare(const DcmElement& rhs) const return -1; } } - else - { - break; // values equal until this point (rhs shorter) - } } } - /* we get here if all values are equal. Now look at the number of components. */ - unsigned long rhsVM = myRhs->getVM(); - if (thisVM < rhsVM) - { - return -1; - } - else if (thisVM > rhsVM) - { - return 1; - } - /* all values as well as VM equal: objects are equal */ return 0; } @@ -353,3 +349,23 @@ OFCondition DcmUnsignedShort::verify(const OFBool autocorrect) errorFlag = EC_Normal; return errorFlag; } + + +OFBool DcmUnsignedShort::matches(const DcmElement& candidate, + const OFBool enableWildCardMatching) const +{ + OFstatic_cast(void,enableWildCardMatching); + if (ident() == candidate.ident()) + { + // some const casts to call the getter functions, I do not modify the values, I promise! + DcmUnsignedShort& key = OFconst_cast(DcmUnsignedShort&,*this); + DcmElement& can = OFconst_cast(DcmElement&,candidate); + Uint16 a, b; + for( unsigned long ui = 0; ui < key.getVM(); ++ui ) + for( unsigned long uj = 0; uj < can.getVM(); ++uj ) + if( key.getUint16( a, ui ).good() && can.getUint16( b, uj ).good() && a == b ) + return OFTrue; + return key.getVM() == 0; + } + return OFFalse; +} diff --git a/dcmdata/libsrc/dcvrut.cc b/dcmdata/libsrc/dcvrut.cc index 9a21d515..e9eaa840 100644 --- a/dcmdata/libsrc/dcvrut.cc +++ b/dcmdata/libsrc/dcvrut.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2014, OFFIS e.V. + * Copyright (C) 1998-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -84,7 +84,8 @@ OFCondition DcmUnlimitedText::checkValue(const OFString & /*vm*/, { OFString charset; /* try to determine the value of the SpecificCharacterSet element */ - getSpecificCharacterSet(charset); + if (getSpecificCharacterSet(charset) == EC_CorruptedData) + charset = "UNKNOWN"; l_error = DcmUnlimitedText::checkStringValue(strVal, charset); } return l_error; diff --git a/dcmdata/libsrc/dcxfer.cc b/dcmdata/libsrc/dcxfer.cc index b3244c34..f138c10d 100644 --- a/dcmdata/libsrc/dcxfer.cc +++ b/dcmdata/libsrc/dcxfer.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -33,6 +33,7 @@ typedef struct const char *xferName; E_TransferSyntax xfer; E_ByteOrder byteOrder; + E_ByteOrder pixelDataByteOrder; E_VRType vrType; E_JPEGEncapsulated encapsulated; Uint32 JPEGProcess8; @@ -53,6 +54,7 @@ const S_XferNames XferNames[] = "Little Endian Implicit", EXS_LittleEndianImplicit, EBO_LittleEndian, + EBO_LittleEndian, EVT_Implicit, EJE_NotEncapsulated, 0L, 0L, @@ -64,6 +66,7 @@ const S_XferNames XferNames[] = "Virtual Big Endian Implicit", EXS_BigEndianImplicit, EBO_BigEndian, + EBO_BigEndian, EVT_Implicit, EJE_NotEncapsulated, 0L, 0L, @@ -75,6 +78,7 @@ const S_XferNames XferNames[] = "Little Endian Explicit", EXS_LittleEndianExplicit, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_NotEncapsulated, 0L, 0L, @@ -86,6 +90,7 @@ const S_XferNames XferNames[] = "Big Endian Explicit", EXS_BigEndianExplicit, EBO_BigEndian, + EBO_BigEndian, EVT_Explicit, EJE_NotEncapsulated, 0L, 0L, @@ -97,6 +102,7 @@ const S_XferNames XferNames[] = "JPEG Baseline", EXS_JPEGProcess1, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 1L, 1L, @@ -108,6 +114,7 @@ const S_XferNames XferNames[] = "JPEG Extended, Process 2+4", EXS_JPEGProcess2_4, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 2L ,4L, @@ -119,6 +126,7 @@ const S_XferNames XferNames[] = "JPEG Extended, Process 3+5", EXS_JPEGProcess3_5, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 3L ,5L, @@ -130,6 +138,7 @@ const S_XferNames XferNames[] = "JPEG Spectral Selection, Non-hierarchical, Process 6+8", EXS_JPEGProcess6_8, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 6L ,8L, @@ -141,6 +150,7 @@ const S_XferNames XferNames[] = "JPEG Spectral Selection, Non-hierarchical, Process 7+9", EXS_JPEGProcess7_9, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 7L ,9L, @@ -152,6 +162,7 @@ const S_XferNames XferNames[] = "JPEG Full Progression, Non-hierarchical, Process 10+12", EXS_JPEGProcess10_12, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 10L ,12L, @@ -163,6 +174,7 @@ const S_XferNames XferNames[] = "JPEG Full Progression, Non-hierarchical, Process 11+13", EXS_JPEGProcess11_13, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 11L ,13L, @@ -174,6 +186,7 @@ const S_XferNames XferNames[] = "JPEG Lossless, Non-hierarchical, Process 14", EXS_JPEGProcess14, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 14L ,14L, @@ -185,6 +198,7 @@ const S_XferNames XferNames[] = "JPEG Lossless, Non-hierarchical, Process 15", EXS_JPEGProcess15, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 15L ,15L, @@ -196,6 +210,7 @@ const S_XferNames XferNames[] = "JPEG Extended, Hierarchical, Process 16+18", EXS_JPEGProcess16_18, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 16L ,18L, @@ -207,6 +222,7 @@ const S_XferNames XferNames[] = "JPEG Extended, Hierarchical, Process 17+19", EXS_JPEGProcess17_19, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 17L ,19L, @@ -218,6 +234,7 @@ const S_XferNames XferNames[] = "JPEG Spectral Selection, Hierarchical, Process 20+22", EXS_JPEGProcess20_22, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 20L ,22L, @@ -229,6 +246,7 @@ const S_XferNames XferNames[] = "JPEG Spectral Selection, Hierarchical, Process 21+23", EXS_JPEGProcess21_23, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 21L ,23L, @@ -240,6 +258,7 @@ const S_XferNames XferNames[] = "JPEG Full Progression, Hierarchical, Process 24+26", EXS_JPEGProcess24_26, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 24L ,26L, @@ -251,6 +270,7 @@ const S_XferNames XferNames[] = "JPEG Full Progression, Hierarchical, Process 25+27", EXS_JPEGProcess25_27, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 25L ,27L, @@ -262,6 +282,7 @@ const S_XferNames XferNames[] = "JPEG Lossless, Hierarchical, Process 28", EXS_JPEGProcess28, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 28L ,28L, @@ -273,6 +294,7 @@ const S_XferNames XferNames[] = "JPEG Lossless, Hierarchical, Process 29", EXS_JPEGProcess29, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 29L ,29L, @@ -284,6 +306,7 @@ const S_XferNames XferNames[] = "JPEG Lossless, Non-hierarchical, 1st Order Prediction", EXS_JPEGProcess14SV1, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 14L ,14L, @@ -295,6 +318,7 @@ const S_XferNames XferNames[] = "RLE Lossless", EXS_RLELossless, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -306,6 +330,7 @@ const S_XferNames XferNames[] = "Deflated Explicit VR Little Endian", EXS_DeflatedLittleEndianExplicit, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_NotEncapsulated, 0L, 0L, @@ -322,6 +347,7 @@ const S_XferNames XferNames[] = "JPEG-LS Lossless", EXS_JPEGLSLossless, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -333,6 +359,7 @@ const S_XferNames XferNames[] = "JPEG-LS Lossy (Near-lossless)", EXS_JPEGLSLossy, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -344,6 +371,7 @@ const S_XferNames XferNames[] = "JPEG 2000 (Lossless only)", EXS_JPEG2000LosslessOnly, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -355,6 +383,7 @@ const S_XferNames XferNames[] = "JPEG 2000 (Lossless or Lossy)", EXS_JPEG2000, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -366,6 +395,7 @@ const S_XferNames XferNames[] = "JPEG 2000 Part 2 Multicomponent Image Compression (Lossless only)", EXS_JPEG2000MulticomponentLosslessOnly, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -377,6 +407,7 @@ const S_XferNames XferNames[] = "JPEG 2000 Part 2 Multicomponent Image Compression (Lossless or Lossy)", EXS_JPEG2000Multicomponent, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -388,6 +419,7 @@ const S_XferNames XferNames[] = "JPIP Referenced", EXS_JPIPReferenced, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_NotEncapsulated, // in fact, pixel data shall be referenced via (0028,7FE0) Pixel Data Provider URL 0L, 0L, @@ -399,6 +431,7 @@ const S_XferNames XferNames[] = "JPIP Referenced Deflate", EXS_JPIPReferencedDeflate, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_NotEncapsulated, // in fact, pixel data shall be referenced via (0028,7FE0) Pixel Data Provider URL 0L, 0L, @@ -415,6 +448,7 @@ const S_XferNames XferNames[] = "MPEG2 Main Profile @ Main Level", // changed with DICOM 2016e to: MPEG2 Main Profile / Main Level EXS_MPEG2MainProfileAtMainLevel, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -426,6 +460,7 @@ const S_XferNames XferNames[] = "MPEG2 Main Profile @ High Level", // changed with DICOM 2016e to: MPEG2 Main Profile / High Level EXS_MPEG2MainProfileAtHighLevel, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -437,6 +472,7 @@ const S_XferNames XferNames[] = "MPEG-4 AVC/H.264 High Profile / Level 4.1", EXS_MPEG4HighProfileLevel4_1, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -448,6 +484,7 @@ const S_XferNames XferNames[] = "MPEG-4 AVC/H.264 BD-compatible High Profile / Level 4.1", EXS_MPEG4BDcompatibleHighProfileLevel4_1, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -459,6 +496,7 @@ const S_XferNames XferNames[] = "MPEG-4 AVC/H.264 High Profile / Level 4.2 For 2D Video", EXS_MPEG4HighProfileLevel4_2_For2DVideo, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -470,6 +508,7 @@ const S_XferNames XferNames[] = "MPEG-4 AVC/H.264 High Profile / Level 4.2 For 3D Video", EXS_MPEG4HighProfileLevel4_2_For3DVideo, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -481,6 +520,7 @@ const S_XferNames XferNames[] = "MPEG-4 AVC/H.264 Stereo High Profile / Level 4.2", EXS_MPEG4StereoHighProfileLevel4_2, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -492,6 +532,7 @@ const S_XferNames XferNames[] = "HEVC/H.265 Main Profile / Level 5.1", EXS_HEVCMainProfileLevel5_1, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, @@ -503,11 +544,24 @@ const S_XferNames XferNames[] = "HEVC/H.265 Main 10 Profile / Level 5.1", EXS_HEVCMain10ProfileLevel5_1, EBO_LittleEndian, + EBO_LittleEndian, EVT_Explicit, EJE_Encapsulated, 0L, 0L, OFTrue, OFFalse, + ESC_none }, + // entry #41 + { UID_PrivateGE_LEI_WithBigEndianPixelDataTransferSyntax, + "Private GE Little Endian Implicit with big endian pixel data", + EXS_PrivateGE_LEI_WithBigEndianPixelData, + EBO_LittleEndian, + EBO_BigEndian, + EVT_Implicit, + EJE_NotEncapsulated, + 0L, 0L, + OFFalse, + OFFalse, ESC_none } }; @@ -522,6 +576,7 @@ DcmXfer::DcmXfer(E_TransferSyntax xfer) xferName(ERROR_XferName), xferSyn(EXS_Unknown), byteOrder(EBO_unknown), + pixelDataByteOrder(EBO_unknown), vrType(EVT_Implicit), encapsulated(EJE_NotEncapsulated), JPEGProcess8(0L), @@ -535,17 +590,18 @@ DcmXfer::DcmXfer(E_TransferSyntax xfer) i++; if ((i < DIM_OF_XferNames) && (XferNames[i].xfer == xfer)) { - xferSyn = XferNames[i].xfer; - xferID = XferNames[i].xferID; - xferName = XferNames[i].xferName; - byteOrder = XferNames[i].byteOrder; - vrType = XferNames[i].vrType; - encapsulated = XferNames[i].encapsulated; - JPEGProcess8 = XferNames[i].JPEGProcess8; - JPEGProcess12 = XferNames[i].JPEGProcess12; - lossy = XferNames[i].lossy; - retired = XferNames[i].retired; - streamCompression = XferNames[i].streamCompression; + xferSyn = XferNames[i].xfer; + xferID = XferNames[i].xferID; + xferName = XferNames[i].xferName; + byteOrder = XferNames[i].byteOrder; + pixelDataByteOrder = XferNames[i].pixelDataByteOrder; + vrType = XferNames[i].vrType; + encapsulated = XferNames[i].encapsulated; + JPEGProcess8 = XferNames[i].JPEGProcess8; + JPEGProcess12 = XferNames[i].JPEGProcess12; + lossy = XferNames[i].lossy; + retired = XferNames[i].retired; + streamCompression = XferNames[i].streamCompression; } } @@ -558,6 +614,7 @@ DcmXfer::DcmXfer(const char* xferName_xferID) xferName(ERROR_XferName), xferSyn(EXS_Unknown), byteOrder(EBO_unknown), + pixelDataByteOrder(EBO_unknown), vrType(EVT_Implicit), encapsulated(EJE_NotEncapsulated), JPEGProcess8(0L), @@ -574,17 +631,18 @@ DcmXfer::DcmXfer(const char* xferName_xferID) i++; if ((i < DIM_OF_XferNames) && (strcmp(XferNames[i].xferID, xname) == 0)) { - xferSyn = XferNames[i].xfer; - xferID = XferNames[i].xferID; - xferName = XferNames[i].xferName; - byteOrder = XferNames[i].byteOrder; - vrType = XferNames[i].vrType; - encapsulated = XferNames[i].encapsulated; - JPEGProcess8 = XferNames[i].JPEGProcess8; - JPEGProcess12 = XferNames[i].JPEGProcess12; - lossy = XferNames[i].lossy; - retired = XferNames[i].retired; - streamCompression = XferNames[i].streamCompression; + xferSyn = XferNames[i].xfer; + xferID = XferNames[i].xferID; + xferName = XferNames[i].xferName; + byteOrder = XferNames[i].byteOrder; + pixelDataByteOrder = XferNames[i].pixelDataByteOrder; + vrType = XferNames[i].vrType; + encapsulated = XferNames[i].encapsulated; + JPEGProcess8 = XferNames[i].JPEGProcess8; + JPEGProcess12 = XferNames[i].JPEGProcess12; + lossy = XferNames[i].lossy; + retired = XferNames[i].retired; + streamCompression = XferNames[i].streamCompression; } else { @@ -593,17 +651,18 @@ DcmXfer::DcmXfer(const char* xferName_xferID) i++; if ((i < DIM_OF_XferNames) && (strcmp(XferNames[i].xferName, xname) == 0)) { - xferSyn = XferNames[i].xfer; - xferID = XferNames[i].xferID; - xferName = XferNames[i].xferName; - byteOrder = XferNames[i].byteOrder; - vrType = XferNames[i].vrType; - encapsulated = XferNames[i].encapsulated; - JPEGProcess8 = XferNames[i].JPEGProcess8; - JPEGProcess12 = XferNames[i].JPEGProcess12; - lossy = XferNames[i].lossy; - retired = XferNames[i].retired; - streamCompression = XferNames[i].streamCompression; + xferSyn = XferNames[i].xfer; + xferID = XferNames[i].xferID; + xferName = XferNames[i].xferName; + byteOrder = XferNames[i].byteOrder; + pixelDataByteOrder = XferNames[i].pixelDataByteOrder; + vrType = XferNames[i].vrType; + encapsulated = XferNames[i].encapsulated; + JPEGProcess8 = XferNames[i].JPEGProcess8; + JPEGProcess12 = XferNames[i].JPEGProcess12; + lossy = XferNames[i].lossy; + retired = XferNames[i].retired; + streamCompression = XferNames[i].streamCompression; } } } @@ -618,6 +677,7 @@ DcmXfer::DcmXfer(const DcmXfer &newXfer) xferName(newXfer.xferName), xferSyn(newXfer.xferSyn), byteOrder(newXfer.byteOrder), + pixelDataByteOrder(newXfer.pixelDataByteOrder), vrType(newXfer.vrType), encapsulated(newXfer.encapsulated), JPEGProcess8(newXfer.JPEGProcess8), @@ -649,29 +709,31 @@ DcmXfer &DcmXfer::operator=(const E_TransferSyntax xfer) i++; if ((i < DIM_OF_XferNames) && (XferNames[i].xfer == xfer)) { - xferSyn = XferNames[i].xfer; - xferID = XferNames[i].xferID; - xferName = XferNames[i].xferName; - byteOrder = XferNames[i].byteOrder; - vrType = XferNames[i].vrType; - encapsulated = XferNames[i].encapsulated; - JPEGProcess8 = XferNames[i].JPEGProcess8; - JPEGProcess12 = XferNames[i].JPEGProcess12; - lossy = XferNames[i].lossy; - retired = XferNames[i].retired; - streamCompression = XferNames[i].streamCompression; + xferSyn = XferNames[i].xfer; + xferID = XferNames[i].xferID; + xferName = XferNames[i].xferName; + byteOrder = XferNames[i].byteOrder; + pixelDataByteOrder = XferNames[i].pixelDataByteOrder; + vrType = XferNames[i].vrType; + encapsulated = XferNames[i].encapsulated; + JPEGProcess8 = XferNames[i].JPEGProcess8; + JPEGProcess12 = XferNames[i].JPEGProcess12; + lossy = XferNames[i].lossy; + retired = XferNames[i].retired; + streamCompression = XferNames[i].streamCompression; } else { - xferSyn = EXS_Unknown; - xferID = ""; - xferName = ERROR_XferName; - byteOrder = EBO_unknown; - vrType = EVT_Implicit; - encapsulated = EJE_NotEncapsulated; - JPEGProcess8 = 0L; - JPEGProcess12 = 0L; - lossy = OFFalse; - retired = OFFalse; - streamCompression = ESC_none; + xferSyn = EXS_Unknown; + xferID = ""; + xferName = ERROR_XferName; + byteOrder = EBO_unknown; + pixelDataByteOrder = EBO_unknown; + vrType = EVT_Implicit; + encapsulated = EJE_NotEncapsulated; + JPEGProcess8 = 0L; + JPEGProcess12 = 0L; + lossy = OFFalse; + retired = OFFalse; + streamCompression = ESC_none; } return *this; } @@ -684,17 +746,18 @@ DcmXfer &DcmXfer::operator=(const DcmXfer &newXfer) { if (this != &newXfer) { - xferSyn = newXfer.xferSyn; - xferID = newXfer.xferID; - xferName = newXfer.xferName; - byteOrder = newXfer.byteOrder; - vrType = newXfer.vrType; - encapsulated = newXfer.encapsulated; - JPEGProcess8 = newXfer.JPEGProcess8; - JPEGProcess12 = newXfer.JPEGProcess12; - lossy = newXfer.lossy; - retired = newXfer.retired; - streamCompression = newXfer.streamCompression; + xferSyn = newXfer.xferSyn; + xferID = newXfer.xferID; + xferName = newXfer.xferName; + byteOrder = newXfer.byteOrder; + pixelDataByteOrder = newXfer.pixelDataByteOrder; + vrType = newXfer.vrType; + encapsulated = newXfer.encapsulated; + JPEGProcess8 = newXfer.JPEGProcess8; + JPEGProcess12 = newXfer.JPEGProcess12; + lossy = newXfer.lossy; + retired = newXfer.retired; + streamCompression = newXfer.streamCompression; } return *this; } diff --git a/dcmdata/libsrc/mkdeftag.cc b/dcmdata/libsrc/mkdeftag.cc index fe90c98b..78dc1804 100644 --- a/dcmdata/libsrc/mkdeftag.cc +++ b/dcmdata/libsrc/mkdeftag.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2015, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -20,17 +20,6 @@ */ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ - -#ifdef HAVE_WINDOWS_H -#include /* this includes either winsock.h or winsock2.h */ -#elif defined(HAVE_WINSOCK_H) -#include /* include winsock.h directly i.e. on MacOS */ -#endif - -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/dcmdata/dcdict.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofstring.h" @@ -126,17 +115,7 @@ int main(int argc, char* argv[]) int i = 0; FILE* fout = NULL; -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - -#ifdef HAVE_WINSOCK_H - WSAData winSockData; - /* we need at least version 1.1 */ - WORD winSockVersionNeeded = MAKEWORD( 1, 1 ); - WSAStartup(winSockVersionNeeded, &winSockData); -#endif + OFStandard::initializeNetwork(); prepareCmdLineArgs(argc, argv, "mkdeftag"); diff --git a/dcmdata/libsrc/mkdictbi.cc b/dcmdata/libsrc/mkdictbi.cc index 16af4a01..e05e64c1 100644 --- a/dcmdata/libsrc/mkdictbi.cc +++ b/dcmdata/libsrc/mkdictbi.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2015, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,18 +22,6 @@ */ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ - - -#ifdef HAVE_WINDOWS_H -#include /* this includes either winsock.h or winsock2.h */ -#elif defined(HAVE_WINSOCK_H) -#include /* include winsock.h directly i.e. on MacOS */ -#endif - -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/dcmdata/dcdict.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofstring.h" @@ -123,17 +111,7 @@ main(int argc, char* argv[]) FILE* fout = NULL; DcmDictEntry* e = NULL; -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - -#ifdef HAVE_WINSOCK_H - WSAData winSockData; - /* we need at least version 1.1 */ - WORD winSockVersionNeeded = MAKEWORD( 1, 1 ); - WSAStartup(winSockVersionNeeded, &winSockData); -#endif + OFStandard::initializeNetwork(); prepareCmdLineArgs(argc, argv, "mkdictbi"); diff --git a/dcmdata/libsrc/vrscan.cc b/dcmdata/libsrc/vrscan.cc index ebb4bc29..8482568b 100644 --- a/dcmdata/libsrc/vrscan.cc +++ b/dcmdata/libsrc/vrscan.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2010, OFFIS e.V. + * Copyright (C) 2010-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -61,9 +61,8 @@ int vrscan::scan(const OFString& vr, const OFString& value) if (yylex_init(&scanner)) { - char buf[256]; DCMDATA_WARN("Error while setting up lexer: " - << OFStandard::strerror(errno, buf, sizeof(buf))); + << OFStandard::getLastSystemErrorCode().message()); return 16; } diff --git a/dcmdata/tests/CMakeLists.txt b/dcmdata/tests/CMakeLists.txt index efc8cecf..0d7c0d60 100644 --- a/dcmdata/tests/CMakeLists.txt +++ b/dcmdata/tests/CMakeLists.txt @@ -1,5 +1,5 @@ # declare executables -DCMTK_ADD_EXECUTABLE(dcmdata_tests tests tpread ti2dbmp tchval tpath tvrdatim telemlen tparser tdict tvrds tvrfd tvrpn tvrui tvrol tstrval tspchrs tparent tfilter tvrcomp tmatch) +DCMTK_ADD_EXECUTABLE(dcmdata_tests tests tpread ti2dbmp tchval tpath tvrdatim telemlen tparser tdict tvrds tvrfd tvrpn tvrui tvrol tstrval tspchrs tparent tfilter tvrcomp tmatch tnewdcme tgenuid) # make sure executables are linked to the corresponding libraries DCMTK_TARGET_LINK_MODULES(dcmdata_tests i2d dcmdata oflog ofstd) diff --git a/dcmdata/tests/Makefile.dep b/dcmdata/tests/Makefile.dep index e980384d..267774f1 100644 --- a/dcmdata/tests/Makefile.dep +++ b/dcmdata/tests/Makefile.dep @@ -18,6 +18,7 @@ tchval.o: tchval.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -30,7 +31,9 @@ tchval.o: tchval.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -56,8 +59,6 @@ tchval.o: tchval.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \ ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -102,6 +103,7 @@ tdict.o: tdict.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -114,7 +116,9 @@ tdict.o: tdict.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -149,6 +153,7 @@ telemlen.o: telemlen.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -161,7 +166,9 @@ telemlen.o: telemlen.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -187,8 +194,6 @@ telemlen.o: telemlen.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \ ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -232,6 +237,7 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -244,7 +250,9 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -275,6 +283,7 @@ tfilter.o: tfilter.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -287,7 +296,9 @@ tfilter.o: tfilter.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -309,6 +320,52 @@ tfilter.o: tfilter.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dcstack.h \ ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcdatset.h \ ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dcpcache.h +tgenuid.o: tgenuid.cc ../../config/include/dcmtk/config/osconfig.h \ + ../../ofstd/include/dcmtk/ofstd/oftest.h \ + ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ + ../../oflog/include/dcmtk/oflog/config/defines.h \ + ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ + ../../oflog/include/dcmtk/oflog/loglevel.h \ + ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../oflog/include/dcmtk/oflog/tchar.h \ + ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ + ../../oflog/include/dcmtk/oflog/appender.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../oflog/include/dcmtk/oflog/layout.h \ + ../../oflog/include/dcmtk/oflog/streams.h \ + ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ + ../../oflog/include/dcmtk/oflog/thread/syncprim.h \ + ../../oflog/include/dcmtk/oflog/spi/filter.h \ + ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \ + ../../oflog/include/dcmtk/oflog/spi/logfact.h \ + ../../oflog/include/dcmtk/oflog/logmacro.h \ + ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ + ../../oflog/include/dcmtk/oflog/tracelog.h ti2dbmp.o: ti2dbmp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ @@ -329,6 +386,7 @@ ti2dbmp.o: ti2dbmp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -341,7 +399,9 @@ ti2dbmp.o: ti2dbmp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -378,6 +438,7 @@ tmatch.o: tmatch.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -390,7 +451,9 @@ tmatch.o: tmatch.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -404,6 +467,61 @@ tmatch.o: tmatch.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmdata/dcmatch.h +tnewdcme.o: tnewdcme.cc ../../config/include/dcmtk/config/osconfig.h \ + ../../ofstd/include/dcmtk/ofstd/oftest.h \ + ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ + ../../ofstd/include/dcmtk/ofstd/oftypes.h \ + ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ + ../../ofstd/include/dcmtk/ofstd/ofcast.h \ + ../../ofstd/include/dcmtk/ofstd/ofexport.h \ + ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ + ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ + ../../ofstd/include/dcmtk/ofstd/oflist.h \ + ../../ofstd/include/dcmtk/ofstd/ofstring.h \ + ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ + ../../ofstd/include/dcmtk/ofstd/ofthread.h \ + ../../ofstd/include/dcmtk/ofstd/offile.h \ + ../../ofstd/include/dcmtk/ofstd/ofstd.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/ofcond.h \ + ../../ofstd/include/dcmtk/ofstd/oflimits.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ + ../../oflog/include/dcmtk/oflog/oflog.h \ + ../../oflog/include/dcmtk/oflog/logger.h \ + ../../oflog/include/dcmtk/oflog/config.h \ + ../../oflog/include/dcmtk/oflog/config/defines.h \ + ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \ + ../../oflog/include/dcmtk/oflog/loglevel.h \ + ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../oflog/include/dcmtk/oflog/tstring.h \ + ../../oflog/include/dcmtk/oflog/tchar.h \ + ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ + ../../oflog/include/dcmtk/oflog/appender.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../oflog/include/dcmtk/oflog/layout.h \ + ../../oflog/include/dcmtk/oflog/streams.h \ + ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ + ../../oflog/include/dcmtk/oflog/thread/syncprim.h \ + ../../oflog/include/dcmtk/oflog/spi/filter.h \ + ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \ + ../../oflog/include/dcmtk/oflog/spi/logfact.h \ + ../../oflog/include/dcmtk/oflog/logmacro.h \ + ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ + ../../oflog/include/dcmtk/oflog/tracelog.h \ + ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dctypes.h \ + ../include/dcmtk/dcmdata/dcobject.h \ + ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ + ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \ + ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \ + ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \ + ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h \ + ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcdict.h \ + ../include/dcmtk/dcmdata/dchashdi.h ../include/dcmtk/dcmdata/dcdicent.h tparent.o: tparent.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ @@ -424,6 +542,7 @@ tparent.o: tparent.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -436,7 +555,9 @@ tparent.o: tparent.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -462,8 +583,6 @@ tparent.o: tparent.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \ ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -508,6 +627,7 @@ tparser.o: tparser.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -520,7 +640,9 @@ tparser.o: tparser.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -547,8 +669,6 @@ tparser.o: tparser.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \ ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -593,6 +713,7 @@ tpath.o: tpath.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -605,7 +726,9 @@ tpath.o: tpath.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -631,8 +754,6 @@ tpath.o: tpath.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \ ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -676,6 +797,7 @@ tpread.o: tpread.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -688,7 +810,9 @@ tpread.o: tpread.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -714,8 +838,6 @@ tpread.o: tpread.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcfilefo.h \ ../include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmdata/dcdirrec.h ../include/dcmtk/dcmdata/dcvrulup.h \ ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcpixseq.h \ ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcbytstr.h \ @@ -760,6 +882,7 @@ tspchrs.o: tspchrs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -772,7 +895,9 @@ tspchrs.o: tspchrs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -785,9 +910,6 @@ tspchrs.o: tspchrs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../include/dcmtk/dcmdata/dcspchrs.h \ ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ ../include/dcmtk/dcmdata/dctypes.h tstrval.o: tstrval.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -810,6 +932,7 @@ tstrval.o: tstrval.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -822,7 +945,9 @@ tstrval.o: tstrval.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -859,6 +984,7 @@ tvrcomp.o: tvrcomp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcvras.h ../include/dcmtk/dcmdata/dcbytstr.h \ ../include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -872,7 +998,9 @@ tvrcomp.o: tvrcomp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -904,11 +1032,12 @@ tvrcomp.o: tvrcomp.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmdata/dcpcache.h ../include/dcmtk/dcmdata/dcsequen.h \ ../include/dcmtk/dcmdata/dcvrat.h ../include/dcmtk/dcmdata/dcvrfd.h \ ../include/dcmtk/dcmdata/dcvrfl.h ../include/dcmtk/dcmdata/dcvrobow.h \ - ../include/dcmtk/dcmdata/dcvrsl.h ../include/dcmtk/dcmdata/dcvrss.h \ - ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcvrus.h \ - ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcpxitem.h \ - ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcvrpobw.h \ - ../include/dcmtk/dcmdata/dcovlay.h ../include/dcmtk/dcmdata/dcpixel.h + ../include/dcmtk/dcmdata/dcvrpobw.h ../include/dcmtk/dcmdata/dcvrsl.h \ + ../include/dcmtk/dcmdata/dcvrss.h ../include/dcmtk/dcmdata/dcvrul.h \ + ../include/dcmtk/dcmdata/dcvrus.h ../include/dcmtk/dcmdata/dcdeftag.h \ + ../include/dcmtk/dcmdata/dcpxitem.h ../include/dcmtk/dcmdata/dcofsetl.h \ + ../include/dcmtk/dcmdata/dcpixel.h ../include/dcmtk/dcmdata/dcovlay.h \ + ../include/dcmtk/dcmdata/dcpixseq.h tvrdatim.o: tvrdatim.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ @@ -929,6 +1058,7 @@ tvrdatim.o: tvrdatim.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -941,7 +1071,9 @@ tvrdatim.o: tvrdatim.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -985,6 +1117,7 @@ tvrds.o: tvrds.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -997,7 +1130,9 @@ tvrds.o: tvrds.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1036,6 +1171,7 @@ tvrfd.o: tvrfd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1048,7 +1184,9 @@ tvrfd.o: tvrfd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1086,6 +1224,7 @@ tvrol.o: tvrol.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1098,7 +1237,9 @@ tvrol.o: tvrol.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1138,6 +1279,7 @@ tvrpn.o: tvrpn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1150,7 +1292,9 @@ tvrpn.o: tvrpn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1188,6 +1332,7 @@ tvrui.o: tvrui.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1200,7 +1345,9 @@ tvrui.o: tvrui.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ diff --git a/dcmdata/tests/Makefile.in b/dcmdata/tests/Makefile.in index 5a6d7324..247d6cd5 100644 --- a/dcmdata/tests/Makefile.in +++ b/dcmdata/tests/Makefile.in @@ -18,12 +18,12 @@ oflogdir = $(top_srcdir)/../oflog LOCALINCLUDES = -I$(top_srcdir)/include -I$(ofstddir)/include -I$(oflogdir)/include LIBDIRS = -L$(top_srcdir)/libsrc -L$(top_srcdir)/libi2d -L$(ofstddir)/libsrc \ -L$(oflogdir)/libsrc -LOCALLIBS = -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS) +LOCALLIBS = -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS) I2DLIBS = -li2d objs = tests.o tpread.o ti2dbmp.o tchval.o tpath.o tvrdatim.o telemlen.o tparser.o \ tdict.o tvrds.o tvrfd.o tvrui.o tvrol.o tstrval.o tspchrs.o tvrpn.o \ - tparent.o tfilter.o tvrcomp.o tmatch.o + tparent.o tfilter.o tvrcomp.o tmatch.o tnewdcme.o tgenuid.o progs = tests diff --git a/dcmdata/tests/tests.cc b/dcmdata/tests/tests.cc index 57470f38..8c849ba6 100644 --- a/dcmdata/tests/tests.cc +++ b/dcmdata/tests/tests.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2011-2016 OFFIS e.V. + * Copyright (C) 2011-2017 OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -104,4 +104,6 @@ OFTEST_REGISTER(dcmdata_specificCharacterSet_3); OFTEST_REGISTER(dcmdata_specificCharacterSet_4); OFTEST_REGISTER(dcmdata_attribute_filter); OFTEST_REGISTER(dcmdata_attribute_matching); +OFTEST_REGISTER(dcmdata_newDicomElementPrivate); +OFTEST_REGISTER(dcmdata_generateUniqueIdentifier); OFTEST_MAIN("dcmdata") diff --git a/dcmdata/tests/tgenuid.cc b/dcmdata/tests/tgenuid.cc new file mode 100644 index 00000000..9830dbfc --- /dev/null +++ b/dcmdata/tests/tgenuid.cc @@ -0,0 +1,56 @@ +/* + * + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmdata + * + * Author: Marco Eichelberg + * + * Purpose: test program for function dcmGenerateUniqueIdentifier + * + */ + + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/ofstd/oftest.h" +#include "dcmtk/dcmdata/dcuid.h" + + +OFTEST(dcmdata_generateUniqueIdentifier) +{ + // test generation of UIDs. We generate 10000 UIDs in quick + // succession and check if they are pair-wise different. + // This will also catch any application error during UID generation. + + char uid[65]; + OFString previousuid; + + // This variable name will be printed on the console if the test fails. + // In fact a generated UID is not unique if this variable is false! + OFBool generated_uid_is_not_unique; + + for (size_t i = 0; i < 10000; ++i) + { + // generate UID + dcmGenerateUniqueIdentifier(uid); + + // compare with the previously generated UID, should be different. + generated_uid_is_not_unique = (previousuid != uid); + OFCHECK(generated_uid_is_not_unique); + previousuid = uid; + + // if we have found a non-unique UID, the test has failed. + // Break out of the loop. + if (! generated_uid_is_not_unique) break; + } +} diff --git a/dcmdata/tests/tnewdcme.cc b/dcmdata/tests/tnewdcme.cc new file mode 100644 index 00000000..a5aad1d9 --- /dev/null +++ b/dcmdata/tests/tnewdcme.cc @@ -0,0 +1,101 @@ +/* + * + * Copyright (C) 2017, Open Connections GmbH + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation are maintained by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmdata + * + * Author: Michael Onken + * + * Purpose: Tests for DcmItem's newDicomElement() helper methods + * + */ + + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#include "dcmtk/ofstd/oftest.h" +#include "dcmtk/dcmdata/dcitem.h" +#include "dcmtk/dcmdata/dcelem.h" +#include "dcmtk/dcmdata/dcitem.h" +#include "dcmtk/dcmdata/dcdict.h" +#include "dcmtk/dcmdata/dcdicent.h" + +// Definitions of private tag info we use in this test + +#define PRIVATE_CREATOR_NAME "John Doe Testing Corporation" +#define PRIVATE_ELEMENT_STRINGELEM 0x0029, 0x1000 +#define PRIVATE_ELEMENT_NOTINDICT 0x0029, 0x1111 +#define PRIVATE_STRING_VALUE "Test Value" + +/** Register private tag(s) in runtime dictionary + */ +void registerPrivateTag() + +{ + DcmDataDictionary &dict = dcmDataDict.wrlock(); + dict.addEntry(new DcmDictEntry(PRIVATE_ELEMENT_STRINGELEM, EVR_LO, "StringAttributeForTesting", 1, 1, "private", OFTrue, PRIVATE_CREATOR_NAME)); + dcmDataDict.unlock(); + +} + + +OFTEST(dcmdata_newDicomElementPrivate) +{ + // Pre-register the private tags we want to use for this test in the dictionary + registerPrivateTag(); + + // Test cases when constructing a known, private element: + + // API 1: Construct DICOM element and get it as a return value. + DcmElement *elem = DcmItem::newDicomElement(DcmTagKey(PRIVATE_ELEMENT_STRINGELEM), PRIVATE_CREATOR_NAME); + // Check whether creation as well as tag and value assignment are correct + OFCHECK(elem); + OFCHECK(elem->putOFStringArray(PRIVATE_STRING_VALUE).good()); + OFCHECK(elem->getTag().getXTag() == DcmTagKey(PRIVATE_ELEMENT_STRINGELEM)); + OFCHECK(elem->getVR() == EVR_LO); + OFCHECK(elem->putOFStringArray(PRIVATE_STRING_VALUE).good()); + char *charVal = NULL; + OFCHECK(elem->getString(charVal).good()); + OFCHECK(OFString(charVal) == PRIVATE_STRING_VALUE); + charVal = NULL; + + // API 2: Construct DICOM element and get it as parameter output value + DcmElement* elem2 = NULL; + // Check whether creation as well as tag and value assignment are correct + OFCHECK(DcmItem::newDicomElement(elem2, DcmTagKey(PRIVATE_ELEMENT_STRINGELEM), PRIVATE_CREATOR_NAME).good()); + OFCHECK(elem2->getTag().getXTag() == DcmTagKey(PRIVATE_ELEMENT_STRINGELEM)); + OFCHECK(elem->getVR() == EVR_LO); + OFCHECK(elem2->putOFStringArray(PRIVATE_STRING_VALUE).good()); + OFCHECK(elem2->getString(charVal).good()); + OFCHECK(OFString(charVal) == PRIVATE_STRING_VALUE); + + delete elem; + delete elem2; + + // Test cases when constructing an unknown, private element resulting in creation + // with VR "EVR_UNKNOWN": + + // API 1 + DcmElement *elem_un = NULL; + elem_un = DcmItem::newDicomElement(DcmTagKey(PRIVATE_ELEMENT_NOTINDICT), PRIVATE_CREATOR_NAME); + OFCHECK(elem_un); + OFCHECK(elem_un->getTag().getXTag() == DcmTagKey(PRIVATE_ELEMENT_NOTINDICT)); + OFCHECK(elem_un->getVR() == EVR_UNKNOWN); + delete elem_un; + + // API 2 + elem_un = NULL; + OFCHECK(DcmItem::newDicomElement(elem_un, DcmTagKey(PRIVATE_ELEMENT_NOTINDICT), PRIVATE_CREATOR_NAME).good()); + OFCHECK(elem_un); + OFCHECK(elem_un->getVR() == EVR_UNKNOWN); + delete elem_un; +} diff --git a/dcmdata/tests/tparent.cc b/dcmdata/tests/tparent.cc index ddf3b3cb..a202da48 100644 --- a/dcmdata/tests/tparent.cc +++ b/dcmdata/tests/tparent.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2012, OFFIS e.V. + * Copyright (C) 2012-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -143,7 +143,7 @@ OFTEST(dcmdata_elementParent) OFCHECK(item->getParent() == seq); testParents(ff); - elem = new DcmLongString(DCM_OtherPatientIDs); + elem = new DcmLongString(DCM_RETIRED_OtherPatientIDs); OFCHECK(elem->getParent() == NULL); cond = item->insert(elem); OFCHECK(cond.good()); @@ -157,7 +157,7 @@ OFTEST(dcmdata_elementParent) OFCHECK(item->getParent() == seq); testParents(ff); - elem = new DcmLongString(DCM_OtherPatientIDs); + elem = new DcmLongString(DCM_RETIRED_OtherPatientIDs); OFCHECK(elem->getParent() == NULL); cond = item->insert(elem); OFCHECK(cond.good()); @@ -172,7 +172,7 @@ OFTEST(dcmdata_elementParent) testParents(ff); elem = item->remove(1); - OFCHECK_EQUAL(elem->getTag(), DCM_OtherPatientIDs); + OFCHECK_EQUAL(elem->getTag(), DCM_RETIRED_OtherPatientIDs); OFCHECK(elem->getParent() == NULL); delete elem; testParents(ff); diff --git a/dcmdata/tests/tpath.cc b/dcmdata/tests/tpath.cc index ef598758..5b18a928 100644 --- a/dcmdata/tests/tpath.cc +++ b/dcmdata/tests/tpath.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2008-2011, OFFIS e.V. + * Copyright (C) 2008-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -152,11 +152,6 @@ static OFCondition testPathInsertionsWithWildcard(const OFString& path, OFTEST(dcmdata_pathAccess) { - // TODO TODO TODO TODO TODO TODO TODO TODO -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif /* make sure data dictionary is loaded */ if (!dcmDataDict.isDictionaryLoaded()) diff --git a/dcmdata/tests/tpread.cc b/dcmdata/tests/tpread.cc index 9e4971fc..4548a035 100644 --- a/dcmdata/tests/tpread.cc +++ b/dcmdata/tests/tpread.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2011, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,10 +26,6 @@ #define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/ofstd/oftest.h" #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/dcuid.h" /* for dcmtk version name */ @@ -315,11 +311,6 @@ static OFCondition randomRead(DcmDataset *dset, unsigned char *buffer) OFTEST(dcmdata_partialElementAccess) { - // TODO TODO TODO TODO??? -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif /* make sure data dictionary is loaded */ if (!dcmDataDict.isDictionaryLoaded()) diff --git a/dcmdata/tests/tvrcomp.cc b/dcmdata/tests/tvrcomp.cc index e14a6a67..a430c1e0 100644 --- a/dcmdata/tests/tvrcomp.cc +++ b/dcmdata/tests/tvrcomp.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015, OFFIS e.V. + * Copyright (C) 2015-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -11,11 +11,11 @@ * D-26121 Oldenburg, Germany * * - * Module: ofstd + * Module: dcmdata * * Author: Michael Onken * - * Purpose: tests for compare() as well as < and > operators of VR classes + * Purpose: tests for compare() operator of VR classes * */ @@ -47,15 +47,18 @@ #include "dcmtk/dcmdata/dcvrfd.h" #include "dcmtk/dcmdata/dcvrfl.h" #include "dcmtk/dcmdata/dcvrobow.h" +#include "dcmtk/dcmdata/dcvrpobw.h" #include "dcmtk/dcmdata/dcvrsl.h" #include "dcmtk/dcmdata/dcvrss.h" #include "dcmtk/dcmdata/dcvrul.h" #include "dcmtk/dcmdata/dcvrus.h" #include "dcmtk/dcmdata/dcdeftag.h" #include "dcmtk/dcmdata/dcpxitem.h" +#include "dcmtk/dcmdata/dcpixel.h" #include "dcmtk/dcmdata/dcvrpobw.h" #include "dcmtk/dcmdata/dcovlay.h" #include "dcmtk/dcmdata/dcpixel.h" +#include "dcmtk/dcmdata/dcpixseq.h" template @@ -265,13 +268,12 @@ static void checkFloatingPointSingle() OFCHECK(obj2 >= obj1); } -template -static void checkOtherByteOtherWord(const DcmTagKey& tagKey) +static void checkOtherByteOtherWord() { // Start with equal values - BinaryOBOWType obj1(tagKey); - BinaryOBOWType obj2(tagKey); - BinaryOBOWType objOtherTag(DCM_UndefinedTagKey); + DcmOtherByteOtherWord obj1(DCM_PixelData); + DcmOtherByteOtherWord obj2(DCM_PixelData); + DcmOtherByteOtherWord objOtherTag(DCM_UndefinedTagKey); // Check equality Uint8 testData[1] = {100}; @@ -320,6 +322,284 @@ static void checkOtherByteOtherWord(const DcmTagKey& tagKey) } +static void checkPolymorphOtherByteOtherWord() +{ + // Start comparing OB with OB + DcmPolymorphOBOW obj1_ob(DCM_PixelData); + DcmPolymorphOBOW obj2_ob(DCM_PixelData); + obj1_ob.setVR(EVR_OB); + obj2_ob.setVR(EVR_OB); + + OFCHECK(obj1_ob.compare(obj2_ob) == 0); + OFCHECK(obj1_ob >= obj2_ob); + OFCHECK(obj1_ob <= obj2_ob); + OFCHECK(obj2_ob >= obj1_ob); + OFCHECK(obj2_ob <= obj2_ob); + + // Compare with same values (still equal) + Uint8 testData_100[1] = {100}; + OFCHECK(obj1_ob.putUint8Array(testData_100, 1).good()); + OFCHECK(obj2_ob.putUint8Array(testData_100, 1).good()); + OFCHECK(obj1_ob.compare(obj2_ob) == 0); + OFCHECK(obj1_ob >= obj2_ob); + OFCHECK(obj1_ob <= obj2_ob); + OFCHECK(obj2_ob >= obj1_ob); + OFCHECK(obj2_ob <= obj2_ob); + OFCHECK(!(obj1_ob > obj2_ob)); + OFCHECK(!(obj1_ob < obj2_ob)); + + + // Compare with different values (single value, obj1 < obj2) + Uint8 testData_200[1] = {200}; + OFCHECK(obj1_ob.putUint8Array(testData_100, 1).good()); + OFCHECK(obj2_ob.putUint8Array(testData_200, 1).good()); + OFCHECK(obj1_ob.compare(obj2_ob) == -1); + OFCHECK(obj1_ob < obj2_ob); + OFCHECK(obj1_ob <= obj2_ob); + + // Compare with different number of values (less values, i.e. obj1, means smaller) + Uint8 testData_100_200[2] = {100,200}; + OFCHECK(obj1_ob.putUint8Array(testData_100, 1).good()); + OFCHECK(obj2_ob.putUint8Array(testData_100_200, 2).good()); + OFCHECK(obj1_ob.compare(obj2_ob) < 0); + OFCHECK(obj1_ob < obj2_ob); + OFCHECK(obj1_ob <= obj2_ob); + + // Compare values (same multiple values means equal) + OFCHECK(obj1_ob.putUint8Array(testData_100_200, 2).good()); + OFCHECK(obj2_ob.putUint8Array(testData_100_200, 2).good()); + OFCHECK(obj1_ob.compare(obj2_ob) == 0); + OFCHECK(!(obj1_ob < obj2_ob)); + OFCHECK(!(obj2_ob < obj2_ob)); + OFCHECK(obj1_ob <= obj2_ob); + + // Compare values (same number of values but different values means not equal, obj1 < obj2) + Uint8 testData_100_201[2] = {100,201}; + OFCHECK(obj1_ob.putUint8Array(testData_100_200, 2).good()); + OFCHECK(obj2_ob.putUint8Array(testData_100_201, 2).good()); + OFCHECK(obj1_ob.compare(obj2_ob) == -1); + OFCHECK(obj1_ob < obj2_ob); + OFCHECK(!(obj2_ob < obj2_ob)); + OFCHECK(obj1_ob <= obj2_ob); +} + + +static void checkDcmPixelDataNative() +{ + // Testing DcmPixelData having uncompressed pixel data. + // The tests here finally boil down in the usage of + // DcmPolymorphOBOW::compare() which is called within + // DcmPixelData::compare() + + // ------------------------------- + // Start with comparing OB with OB + // ------------------------------- + + DcmPixelData obj1_ob(DCM_PixelData); + DcmPixelData obj2_ob(DCM_PixelData); + obj1_ob.setVR(EVR_OB); + obj2_ob.setVR(EVR_OB); + + // Compare empty + OFCHECK(obj1_ob.compare(obj2_ob) == 0); + OFCHECK(obj1_ob >= obj2_ob); + OFCHECK(obj2_ob >= obj1_ob); + + // Compare with same values (still equal), uncompressed + Uint8 testData_100[1] = {100}; + OFCHECK(obj1_ob.putUint8Array(testData_100, 1).good()); + OFCHECK(obj2_ob.putUint8Array(testData_100, 1).good()); + OFCHECK(obj1_ob.compare(obj2_ob) == 0); + OFCHECK(obj1_ob >= obj2_ob); + OFCHECK(obj2_ob >= obj1_ob); + OFCHECK(!(obj1_ob > obj2_ob)); + OFCHECK(!(obj1_ob < obj2_ob)); + + // Compare with different values (single value, obj1 < obj2) + Uint8 testData_200[1] = {200}; + OFCHECK(obj1_ob.putUint8Array(testData_100, 1).good()); + OFCHECK(obj2_ob.putUint8Array(testData_200, 1).good()); + OFCHECK(obj1_ob.compare(obj2_ob) == -1); + OFCHECK(obj1_ob < obj2_ob); + OFCHECK(obj1_ob <= obj2_ob); + + // Compare with different number of values (less values, i.e. obj1, means smaller) + Uint8 testData_100_200[2] = {100,200}; + OFCHECK(obj1_ob.putUint8Array(testData_100, 1).good()); + OFCHECK(obj2_ob.putUint8Array(testData_100_200, 2).good()); + OFCHECK(obj1_ob.compare(obj2_ob) < 0); + OFCHECK(obj1_ob < obj2_ob); + OFCHECK(obj1_ob <= obj2_ob); + + // Compare values (same multiple values means equal) + OFCHECK(obj1_ob.putUint8Array(testData_100_200, 2).good()); + OFCHECK(obj2_ob.putUint8Array(testData_100_200, 2).good()); + OFCHECK(obj1_ob.compare(obj2_ob) == 0); + OFCHECK(!(obj1_ob < obj2_ob)); + OFCHECK(!(obj2_ob < obj2_ob)); + OFCHECK(obj1_ob <= obj2_ob); + + // Compare values (same number of values but different values means not equal, obj1 < obj2) + Uint8 testData_100_201[2] = {100,201}; + OFCHECK(obj1_ob.putUint8Array(testData_100_200, 2).good()); + OFCHECK(obj2_ob.putUint8Array(testData_100_201, 2).good()); + OFCHECK(obj1_ob.compare(obj2_ob) == -1); + OFCHECK(obj1_ob < obj2_ob); + OFCHECK(!(obj2_ob < obj2_ob)); + OFCHECK(obj1_ob <= obj2_ob); + + // ------------------------------- + // Continue comparing OW with OW + // ------------------------------- + + DcmPixelData obj1_ow(DCM_PixelData); + DcmPixelData obj2_ow(DCM_PixelData); + obj1_ow.setVR(EVR_OW); + obj2_ow.setVR(EVR_OW); + + // Compare empty (equal) + OFCHECK(obj1_ow.compare(obj2_ow) == 0); + OFCHECK(obj1_ow >= obj2_ow); + OFCHECK(obj2_ow >= obj1_ow); + + // Compare with same values (still equal), uncompressed + Uint16 testData_1000[1] = {0x1000}; + OFCHECK(obj1_ow.putUint16Array(testData_1000, 1).good()); + OFCHECK(obj2_ow.putUint16Array(testData_1000, 1).good()); + OFCHECK(obj1_ow.compare(obj2_ow) == 0); + OFCHECK(obj1_ow >= obj2_ow); + OFCHECK(obj2_ow >= obj1_ow); + + // Compare with different values (single value) + Uint16 testData_2000[1] = {0x2000}; + OFCHECK(obj1_ow.putUint16Array(testData_1000, 1).good()); + OFCHECK(obj2_ow.putUint16Array(testData_2000, 1).good()); + OFCHECK(obj1_ow.compare(obj2_ow) == -1); + OFCHECK(obj1_ow < obj2_ow); + + // Compare with different number of values (less values, i.e. obj1, means smaller) + Uint16 testData_1000_2000[2] = {0x1000,0x2000}; + OFCHECK(obj1_ow.putUint16Array(testData_1000, 1).good()); + OFCHECK(obj2_ow.putUint16Array(testData_1000_2000, 2).good()); + OFCHECK(obj1_ow.compare(obj2_ow) < 0); + OFCHECK(obj1_ow < obj2_ow); + + // Compare values (same multiple values means equal) + OFCHECK(obj1_ow.putUint16Array(testData_1000_2000, 2).good()); + OFCHECK(obj2_ow.putUint16Array(testData_1000_2000, 2).good()); + OFCHECK(obj1_ow.compare(obj2_ow) == 0); + OFCHECK(!(obj1_ow < obj2_ow)); + OFCHECK(!(obj2_ow < obj2_ow)); + OFCHECK(obj1_ow <= obj2_ow); + + // Compare values (same number of values but different values means not equal, obj1 < obj2) + Uint16 testData_1000_2001[2] = {0x1000,0x2001}; + OFCHECK(obj1_ow.putUint16Array(testData_1000_2000, 2).good()); + OFCHECK(obj2_ow.putUint16Array(testData_1000_2001, 2).good()); + OFCHECK(obj1_ow.compare(obj2_ow) == -1); + OFCHECK(obj1_ow < obj2_ow); + OFCHECK(!(obj2_ow < obj2_ow)); + OFCHECK(obj1_ow <= obj2_ow); + + + // Continue with comparison of OB with OW + Uint8 testData8_10[1] = {0x10}; + Uint16 testData16_0010[1] = {0x0010}; + obj1_ob.putUint8Array(testData8_10, 1); + obj2_ow.putUint16Array(testData16_0010, 1); + // OB and OW with same value should be equal + // (comparison takes place bytewise in little endian) + OFCHECK(obj1_ob.compare(obj2_ow) == 0); + OFCHECK(obj1_ob >= obj2_ow); + OFCHECK(obj2_ow >= obj1_ob); + + // Compare with different values + Uint16 testData16_0011[1] = {0x0011}; + OFCHECK(obj1_ob.putUint8Array(testData8_10, 1).good()); + OFCHECK(obj2_ow.putUint16Array(testData16_0011, 1).good()); + OFCHECK(obj1_ob.compare(obj2_ow) < 0); + OFCHECK(obj1_ob < obj2_ow); + + // Compare with different number of values (less values, i.e. obj1, means smaller) + Uint16 testData16_0010_0020[2] = {0x0010,0x0020}; + OFCHECK(obj1_ob.putUint8Array(testData8_10, 1).good()); + OFCHECK(obj2_ow.putUint16Array(testData16_0010_0020, 2).good()); + OFCHECK(obj1_ow.compare(obj2_ow) < 0); + OFCHECK(obj1_ow < obj2_ow); +} + + +static void checkDcmPixelDataEncapsulatedOB() +{ + DcmPixelData obj1_ob(DCM_PixelData); + DcmPixelData obj2_ob(DCM_PixelData); + obj1_ob.setVR(EVR_OB); + obj2_ob.setVR(EVR_OB); + Uint8 testData8_1010[2] = {0x10,0x10}; + + // (Compare empty already om checkDcmPixelDataNative()) + + // -------------------------------------------- + // Compare with same current representation + // -------------------------------------------- + + DcmPixelSequence *pixseq1 = new DcmPixelSequence(DCM_PixelData); + OFCHECK(pixseq1 != NULL); + DcmOffsetList offsetList; + DcmPixelItem *offsetItem = new DcmPixelItem(DCM_PixelItemTag); + OFCHECK(offsetItem != NULL); + // First item is always offset table + OFCHECK(pixseq1->insert(offsetItem).good()); + OFCHECK(pixseq1->storeCompressedFrame(offsetList, testData8_1010, 2, 0).good()); + obj1_ob.putOriginalRepresentation(EXS_JPEGProcess14SV1, NULL, pixseq1); + + // Compare objects with two equal single frames + DcmPixelSequence *pixseq2 = new DcmPixelSequence(DCM_PixelData); + OFCHECK(pixseq2 != NULL); + offsetItem = new DcmPixelItem(DCM_PixelItemTag); + OFCHECK(offsetItem != NULL); + OFCHECK(pixseq2->insert(offsetItem).good()); + OFCHECK(pixseq2->storeCompressedFrame(offsetList, testData8_1010, 2, 0).good()); + obj2_ob.putOriginalRepresentation(EXS_JPEGProcess14SV1, NULL, pixseq2); + OFCHECK(obj1_ob.compare(obj2_ob) == 0); + OFCHECK(obj1_ob >= obj2_ob); + + // Compare object with single frame with one with no frame + DcmPixelItem* remove = NULL; + OFCHECK(pixseq2->remove(remove, 1).good()); // remove frame 1 + OFCHECK(obj1_ob.compare(obj2_ob) > 0 ); + + // Compare object with single frame, and with two frames + OFCHECK(pixseq2->insert(remove, 1).good()); // insert frame 1 back in again + OFCHECK(pixseq2->storeCompressedFrame(offsetList, testData8_1010, 2, 0).good()); + OFCHECK(obj1_ob.compare(obj2_ob) < 0); //1 frames < 2 frames + + // Compare objects, both having two frames, with the second frame being different + Uint8 testData8_0505[2] = {0x05,0x05}; + OFCHECK(pixseq1->storeCompressedFrame(offsetList, testData8_0505, 2, 0).good()); + OFCHECK(obj1_ob.compare(obj2_ob) < 0); + + // -------------------------------------------- + // Compare with different current representation + // -------------------------------------------- + + DcmPixelData obj3_ob(DCM_PixelData); + obj3_ob.setVR(EVR_OB); + DcmPixelSequence *pixseq3 = new DcmPixelSequence(DCM_PixelData); + OFCHECK(pixseq3 != NULL); + offsetItem = new DcmPixelItem(DCM_PixelItemTag); + OFCHECK(offsetItem != NULL); + OFCHECK(pixseq3->insert(offsetItem).good()); + // Add same data as in pixseq1 + OFCHECK(pixseq3->storeCompressedFrame(offsetList, testData8_1010, 2, 0).good()); + OFCHECK(pixseq3->storeCompressedFrame(offsetList, testData8_0505, 2, 0).good()); + // But insert and pretend that is RLE + obj3_ob.putOriginalRepresentation(EXS_RLELossless, NULL, pixseq3); + // compare JPEG (pixseq1), with RLE (pixseq3) + OFCHECK(obj1_ob.compare(obj3_ob) == 1); // different current representation returns 1 +} + + static void checkSignedLong() { // Start with equal values @@ -614,13 +894,14 @@ OFTEST(dcmdata_VRCompare) checkByteString(DCM_OtherPatientNames); checkByteString(DCM_RTPlanDescription); checkByteString(DCM_RetrieveURL); + // Check the rest checkAttributeTags(); checkFloatingPointDouble(); checkFloatingPointSingle(); - checkOtherByteOtherWord(DCM_PixelData); - checkOtherByteOtherWord(DCM_PixelData); - checkOtherByteOtherWord(DCM_OverlayData); - checkOtherByteOtherWord(DCM_PixelData); + checkOtherByteOtherWord(); + checkPolymorphOtherByteOtherWord(); + checkDcmPixelDataNative(); + checkDcmPixelDataEncapsulatedOB(); checkSignedLong(); checkSignedShort(); checkUnsignedLong(); diff --git a/dcmfg/CMakeLists.txt b/dcmfg/CMakeLists.txt index 48559a49..725d7916 100644 --- a/dcmfg/CMakeLists.txt +++ b/dcmfg/CMakeLists.txt @@ -2,7 +2,7 @@ PROJECT(dcmfg) # declare include directories which hold for all subdirectories -INCLUDE_DIRECTORIES(${dcmfg_SOURCE_DIR}/include ${dcmiod_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${ZLIB_INCDIR}) +INCLUDE_DIRECTORIES("${dcmfg_SOURCE_DIR}/include" "${dcmiod_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" ${ZLIB_INCDIR}) # recurse into subdirectories FOREACH(SUBDIR libsrc include) diff --git a/dcmfg/include/CMakeLists.txt b/dcmfg/include/CMakeLists.txt index 516fa22a..5227b72e 100644 --- a/dcmfg/include/CMakeLists.txt +++ b/dcmfg/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmfg DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmfg DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmfg/include/dcmtk/dcmfg/fgrealworldvaluemapping.h b/dcmfg/include/dcmtk/dcmfg/fgrealworldvaluemapping.h index 0465b53f..27545f9f 100644 --- a/dcmfg/include/dcmtk/dcmfg/fgrealworldvaluemapping.h +++ b/dcmfg/include/dcmtk/dcmfg/fgrealworldvaluemapping.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, Open Connections GmbH + * Copyright (C) 2015-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -308,13 +308,13 @@ public: /** Set Real World Value First Value Mapped * @param value Value to be set. If Pixel Representation is -1 (signed * pixel data) value must be -2^15 < value < 2^15-1. Otherwise use - * setRealWorldValueFirstValueMappedUnSigned(). + * setRealWorldValueFirstValueMappedUnsigned(). * @param checkValue Check 'value'. Not evaluated (here for consistency * with other setter functions). * @return EC_Normal if successful, an error code otherwise */ - virtual OFCondition setRealWorldValueFirstValueMappeSigned(const Sint16 &value, - const OFBool checkValue = OFTrue); + virtual OFCondition setRealWorldValueFirstValueMappedSigned(const Sint16 &value, + const OFBool checkValue = OFTrue); /** Set Real World Value Last Value Mapped * @param value Value to be set. If Pixel Representation is 0 (unsigned @@ -330,7 +330,7 @@ public: /** Set Real World Value Last Value Mapped * @param value Value to be set. If Pixel Representation is -1 (signed * pixel data) value must be -2^15 < value < 2^15-1. Otherwise use - * setRealWorldValueLastValueMappedUnSigned(). + * setRealWorldValueLastValueMappedUnsigned(). * @param checkValue Check 'value'. Not evaluated (here for consistency * with other setter functions). * @return EC_Normal if successful, an error code otherwise diff --git a/dcmfg/libsrc/Makefile.dep b/dcmfg/libsrc/Makefile.dep index 8617090d..70083293 100644 --- a/dcmfg/libsrc/Makefile.dep +++ b/dcmfg/libsrc/Makefile.dep @@ -22,7 +22,7 @@ fg.o: fg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -42,6 +42,7 @@ fg.o: fg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ @@ -126,6 +127,7 @@ fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -140,7 +142,9 @@ fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -183,8 +187,6 @@ fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -233,7 +235,6 @@ fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../../dcmiod/include/dcmtk/dcmiod/modpatient.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../dcmiod/include/dcmtk/dcmiod/modbase.h \ ../../dcmiod/include/dcmtk/dcmiod/modpatientstudy.h \ ../../ofstd/include/dcmtk/ofstd/ofoption.h \ @@ -262,6 +263,7 @@ fgderimg.o: fgderimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -274,7 +276,9 @@ fgderimg.o: fgderimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -319,8 +323,6 @@ fgderimg.o: fgderimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -367,8 +369,8 @@ fgderimg.o: fgderimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../../dcmiod/include/dcmtk/dcmiod/modbase.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmfg/fgbase.h \ - ../include/dcmtk/dcmfg/fgtypes.h ../include/dcmtk/dcmfg/fgdefine.h \ + ../include/dcmtk/dcmfg/fgbase.h ../include/dcmtk/dcmfg/fgtypes.h \ + ../include/dcmtk/dcmfg/fgdefine.h \ ../../dcmiod/include/dcmtk/dcmiod/iodutil.h fgfact.o: fgfact.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \ @@ -400,7 +402,9 @@ fgfact.o: fgfact.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -419,6 +423,7 @@ fgfact.o: fgfact.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -434,8 +439,6 @@ fgfact.o: fgfact.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmfg/fgfact.h ../include/dcmtk/dcmfg/fgtypes.h \ @@ -493,8 +496,7 @@ fgfact.o: fgfact.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmfg/fgdefine.h ../include/dcmtk/dcmfg/fgderimg.h \ ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \ ../../dcmiod/include/dcmtk/dcmiod/modbase.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmfg/fgbase.h \ - ../include/dcmtk/dcmfg/fgfracon.h \ + ../include/dcmtk/dcmfg/fgbase.h ../include/dcmtk/dcmfg/fgfracon.h \ ../include/dcmtk/dcmfg/fgframeanatomy.h \ ../include/dcmtk/dcmfg/fgframevoilut.h \ ../include/dcmtk/dcmfg/fgidentpixeltransform.h \ @@ -538,7 +540,9 @@ fgfracon.o: fgfracon.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -557,6 +561,7 @@ fgfracon.o: fgfracon.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ @@ -571,8 +576,6 @@ fgfracon.o: fgfracon.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmfg/fgfracon.h \ @@ -646,6 +649,7 @@ fgframeanatomy.o: fgframeanatomy.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -658,7 +662,9 @@ fgframeanatomy.o: fgframeanatomy.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -701,8 +707,6 @@ fgframeanatomy.o: fgframeanatomy.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -749,8 +753,8 @@ fgframeanatomy.o: fgframeanatomy.cc \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../../dcmiod/include/dcmtk/dcmiod/modbase.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmfg/fgbase.h \ - ../include/dcmtk/dcmfg/fgtypes.h ../include/dcmtk/dcmfg/fgdefine.h \ + ../include/dcmtk/dcmfg/fgbase.h ../include/dcmtk/dcmfg/fgtypes.h \ + ../include/dcmtk/dcmfg/fgdefine.h \ ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h fgframevoilut.o: fgframevoilut.cc \ @@ -786,7 +790,9 @@ fgframevoilut.o: fgframevoilut.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -805,6 +811,7 @@ fgframevoilut.o: fgframevoilut.cc \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ @@ -819,8 +826,6 @@ fgframevoilut.o: fgframevoilut.cc \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmfg/fgframevoilut.h ../include/dcmtk/dcmfg/fgbase.h \ @@ -909,7 +914,9 @@ fgidentpixeltransform.o: fgidentpixeltransform.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -928,6 +935,7 @@ fgidentpixeltransform.o: fgidentpixeltransform.cc \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ @@ -942,8 +950,6 @@ fgidentpixeltransform.o: fgidentpixeltransform.cc \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmfg/fgidentpixeltransform.h \ @@ -1032,7 +1038,9 @@ fgimagedatatype.o: fgimagedatatype.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1051,6 +1059,7 @@ fgimagedatatype.o: fgimagedatatype.cc \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ @@ -1065,8 +1074,6 @@ fgimagedatatype.o: fgimagedatatype.cc \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmfg/fgimagedatatype.h ../include/dcmtk/dcmfg/fgbase.h \ @@ -1158,7 +1165,6 @@ fginterface.o: fginterface.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1176,6 +1182,7 @@ fginterface.o: fginterface.cc \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -1280,7 +1287,9 @@ fgparametricmapframetype.o: fgparametricmapframetype.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1299,6 +1308,7 @@ fgparametricmapframetype.o: fgparametricmapframetype.cc \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ @@ -1313,8 +1323,6 @@ fgparametricmapframetype.o: fgparametricmapframetype.cc \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmfg/fgparametricmapframetype.h \ @@ -1387,6 +1395,7 @@ fgpixmsr.o: fgpixmsr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1399,7 +1408,9 @@ fgpixmsr.o: fgpixmsr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1444,8 +1455,6 @@ fgpixmsr.o: fgpixmsr.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -1507,6 +1516,7 @@ fgplanor.o: fgplanor.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -1521,7 +1531,9 @@ fgplanor.o: fgplanor.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1564,8 +1576,6 @@ fgplanor.o: fgplanor.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -1644,7 +1654,10 @@ fgplanorvol.o: fgplanorvol.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1661,9 +1674,9 @@ fgplanorvol.o: fgplanorvol.cc \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -1681,8 +1694,6 @@ fgplanorvol.o: fgplanorvol.cc \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmfg/fgplanorvol.h ../include/dcmtk/dcmfg/fgbase.h \ @@ -1752,6 +1763,7 @@ fgplanpo.o: fgplanpo.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -1766,7 +1778,9 @@ fgplanpo.o: fgplanpo.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1809,8 +1823,6 @@ fgplanpo.o: fgplanpo.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -1892,7 +1904,9 @@ fgplanposvol.o: fgplanposvol.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1911,6 +1925,7 @@ fgplanposvol.o: fgplanposvol.cc \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ @@ -1925,8 +1940,6 @@ fgplanposvol.o: fgplanposvol.cc \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmfg/fgplanposvol.h ../include/dcmtk/dcmfg/fgbase.h \ @@ -1998,6 +2011,7 @@ fgrealworldvaluemapping.o: fgrealworldvaluemapping.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -2012,7 +2026,9 @@ fgrealworldvaluemapping.o: fgrealworldvaluemapping.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2055,8 +2071,6 @@ fgrealworldvaluemapping.o: fgrealworldvaluemapping.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -2100,7 +2114,6 @@ fgrealworldvaluemapping.o: fgrealworldvaluemapping.cc \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmfg/fgdefine.h \ ../../dcmiod/include/dcmtk/dcmiod/modbase.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ @@ -2126,6 +2139,7 @@ fgseg.o: fgseg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -2138,7 +2152,9 @@ fgseg.o: fgseg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2182,8 +2198,6 @@ fgseg.o: fgseg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -2250,7 +2264,10 @@ fgtypes.o: fgtypes.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2268,10 +2285,10 @@ fgtypes.o: fgtypes.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ @@ -2301,8 +2318,6 @@ fgtypes.o: fgtypes.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -2351,7 +2366,6 @@ fgtypes.o: fgtypes.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../../dcmiod/include/dcmtk/dcmiod/modpatient.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../dcmiod/include/dcmtk/dcmiod/modbase.h \ ../../dcmiod/include/dcmtk/dcmiod/modpatientstudy.h \ ../../ofstd/include/dcmtk/ofstd/ofoption.h \ @@ -2397,7 +2411,9 @@ fgusimagedescription.o: fgusimagedescription.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2416,6 +2432,7 @@ fgusimagedescription.o: fgusimagedescription.cc \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ @@ -2430,8 +2447,6 @@ fgusimagedescription.o: fgusimagedescription.cc \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmfg/fgusimagedescription.h \ @@ -2533,7 +2548,9 @@ stackinterface.o: stackinterface.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2552,6 +2569,7 @@ stackinterface.o: stackinterface.cc \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -2567,8 +2585,6 @@ stackinterface.o: stackinterface.cc \ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \ ../../dcmiod/include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmfg/stackinterface.h \ diff --git a/dcmfg/libsrc/fginterface.cc b/dcmfg/libsrc/fginterface.cc index c7c08023..1bb58422 100644 --- a/dcmfg/libsrc/fginterface.cc +++ b/dcmfg/libsrc/fginterface.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, Open Connections GmbH + * Copyright (C) 2015-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -75,7 +75,7 @@ OFCondition FGInterface::addShared(const FGBase& group) // Delete all per frame groups of this type for (size_t count = 0; count < m_perFrame.size(); count++) { - deletePerFrame(count, group.getType()); + deletePerFrame(OFstatic_cast(Uint32, count), group.getType()); } // Create copy for insertion @@ -254,7 +254,7 @@ OFCondition FGInterface::readPerFrameFG(DcmItem& dataset) Uint32 count = 0; while (oneFrameItem != NULL) { - OFauto_ptr perFrameGroups(new FunctionalGroups()); + OFunique_ptr perFrameGroups(new FunctionalGroups()); if (!oneFrameItem) { DCMFG_ERROR("Could not get functional group item for frame #" << count << " (internal error)"); @@ -294,7 +294,7 @@ OFCondition FGInterface::readSingleFG(DcmItem& fgItem, OFString fgname; for (size_t count = 0; count < card; count++) { - DcmElement *elem = fgItem.getElement(count); + DcmElement *elem = fgItem.getElement(OFstatic_cast(unsigned long, count)); // TODO: non-sequence elements are not explicitly forbidden here(?), we could store them and re-store them later if (elem->getVR() != EVR_SQ) { @@ -424,7 +424,7 @@ size_t FGInterface::deletePerFrame(const DcmFGTypes::E_FGType fgType) const size_t numFrames = m_perFrame.size(); for (size_t frameNo = 0; frameNo < numFrames; frameNo++) { - if (deletePerFrame(frameNo, fgType)) + if (deletePerFrame(OFstatic_cast(Uint32, frameNo), fgType)) { numDeleted++; } @@ -494,7 +494,7 @@ OFCondition FGInterface::writePerFrameFG(DcmItem& dataset) for ( size_t count = 0; (count < numFrames) && result.good(); count++) { DcmItem* perFrameItem = NULL; - result = dataset.findOrCreateSequenceItem(DCM_PerFrameFunctionalGroupsSequence, perFrameItem, count); + result = dataset.findOrCreateSequenceItem(DCM_PerFrameFunctionalGroupsSequence, perFrameItem, OFstatic_cast(long, count)); if (result.good()) { /* Iterate over groups for each frame */ @@ -603,7 +603,7 @@ OFCondition FGInterface::convertSharedToPerFrame(const DcmFGTypes::E_FGType fgTy } else { - result = insertPerFrame(count, clone, OFTrue /* replace existing */); + result = insertPerFrame(OFstatic_cast(Uint32, count), clone, OFTrue /* replace existing */); if (result.bad()) { delete clone; diff --git a/dcmfg/libsrc/fgrealworldvaluemapping.cc b/dcmfg/libsrc/fgrealworldvaluemapping.cc index 08ba72eb..ef53ab3e 100644 --- a/dcmfg/libsrc/fgrealworldvaluemapping.cc +++ b/dcmfg/libsrc/fgrealworldvaluemapping.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, Open Connections GmbH + * Copyright (C) 2015-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -259,7 +259,7 @@ OFCondition FGRealWorldValueMapping::RWVMItem::getRealWorldValueLUTData(OFVector for (size_t n = 0; n < numValues; n++) { Float64 value; - result = elem->getFloat64(value, n); + result = elem->getFloat64(value, OFstatic_cast(unsigned long, n)); if (result.good()) values.push_back(value); } } @@ -312,8 +312,8 @@ OFCondition FGRealWorldValueMapping::RWVMItem::setRealWorldValueFirstValueMapped } -OFCondition FGRealWorldValueMapping::RWVMItem::setRealWorldValueFirstValueMappeSigned(const Sint16& value, - const OFBool checkValue) +OFCondition FGRealWorldValueMapping::RWVMItem::setRealWorldValueFirstValueMappedSigned(const Sint16& value, + const OFBool checkValue) { (void)checkValue; DcmSignedShort* ss = new DcmSignedShort(DCM_RealWorldValueFirstValueMapped); @@ -391,7 +391,7 @@ OFCondition FGRealWorldValueMapping::RWVMItem::setRealWorldValueLUTData(const OF size_t count = value.size(); for (size_t n = 0; n < count; n++) { - if (result.good()) result = elem->putFloat64(value[n], n); + if (result.good()) result = elem->putFloat64(value[n], OFstatic_cast(unsigned long, n)); } } return result; diff --git a/dcmfg/libsrc/stackinterface.cc b/dcmfg/libsrc/stackinterface.cc index cef3d6f3..50a90ccf 100644 --- a/dcmfg/libsrc/stackinterface.cc +++ b/dcmfg/libsrc/stackinterface.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, Open Connections GmbH + * Copyright (C) 2015-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -62,7 +62,7 @@ OFCondition FGStackInterface::read(FGInterface& fgSource) for (size_t count = 0; count < numFrames; count++) { // Get frame content FG if existing - FGFrameContent* fracon = OFstatic_cast(FGFrameContent*, fgSource.get(count, DcmFGTypes::EFG_FRAMECONTENT)); + FGFrameContent* fracon = OFstatic_cast(FGFrameContent*, fgSource.get(OFstatic_cast(Uint32, count), DcmFGTypes::EFG_FRAMECONTENT)); if (fracon != NULL) { OFString stackID; @@ -78,9 +78,9 @@ OFCondition FGStackInterface::read(FGInterface& fgSource) if ( (*it).second->getStackID() == stackID) { // Add frame to stack if it is not in yet - if ( (*it).second->getInStackPos(count) == 0) + if ( (*it).second->getInStackPos(OFstatic_cast(Uint32, count)) == 0) { - (*it).second->addFrame(count, inStackPos); + (*it).second->addFrame(OFstatic_cast(Uint32, count), inStackPos); } } it++; @@ -93,7 +93,7 @@ OFCondition FGStackInterface::read(FGInterface& fgSource) { return EC_MemoryExhausted; } - stack->addFrame(count, inStackPos); + stack->addFrame(OFstatic_cast(Uint32, count), inStackPos); if ( !m_Stacks.insert(OFMake_pair(stack->getStackID(), stack)).second ) { delete stack; diff --git a/dcmfg/tests/Makefile.in b/dcmfg/tests/Makefile.in index 733bd293..428f5757 100644 --- a/dcmfg/tests/Makefile.in +++ b/dcmfg/tests/Makefile.in @@ -5,7 +5,6 @@ @SET_MAKE@ SHELL = /bin/sh -VPATH = @srcdir@:@top_srcdir@/include:@top_srcdir@/@configdir@/include srcdir = @srcdir@ top_srcdir = @top_srcdir@ configdir = @top_srcdir@/@configdir@ diff --git a/dcmimage/CMakeLists.txt b/dcmimage/CMakeLists.txt index e1313f05..43640518 100644 --- a/dcmimage/CMakeLists.txt +++ b/dcmimage/CMakeLists.txt @@ -2,7 +2,7 @@ PROJECT(dcmimage) # declare include directories which hold for all subdirectories -INCLUDE_DIRECTORIES(${dcmimage_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${ZLIB_INCDIR} ${LIBTIFF_INCDIR} ${LIBPNG_INCDIR}) +INCLUDE_DIRECTORIES("${dcmimage_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" ${ZLIB_INCDIR} ${LIBTIFF_INCDIR} ${LIBPNG_INCDIR}) # recurse into subdirectories FOREACH(SUBDIR libsrc apps include) diff --git a/dcmimage/apps/Makefile.dep b/dcmimage/apps/Makefile.dep index c2aa1a6d..b60482bc 100644 --- a/dcmimage/apps/Makefile.dep +++ b/dcmimage/apps/Makefile.dep @@ -19,7 +19,10 @@ dcm2pnm.o: dcm2pnm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -37,10 +40,10 @@ dcm2pnm.o: dcm2pnm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -68,8 +71,6 @@ dcm2pnm.o: dcm2pnm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -160,7 +161,10 @@ dcmquant.o: dcmquant.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -178,10 +182,10 @@ dcmquant.o: dcmquant.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -209,8 +213,6 @@ dcmquant.o: dcmquant.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -295,7 +297,10 @@ dcmscale.o: dcmscale.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -313,10 +318,10 @@ dcmscale.o: dcmscale.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -344,8 +349,6 @@ dcmscale.o: dcmscale.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ diff --git a/dcmimage/apps/Makefile.in b/dcmimage/apps/Makefile.in index 4e9bb1d4..c04baeb7 100644 --- a/dcmimage/apps/Makefile.in +++ b/dcmimage/apps/Makefile.in @@ -22,7 +22,7 @@ LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include \ LIBDIRS = -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc -L$(oflogdir)/libsrc \ -L$(dcmdatadir)/libsrc -L$(dcmimgledir)/libsrc LOCALLIBS = -ldcmimage -ldcmimgle -ldcmdata -loflog -lofstd $(TIFFLIBS) $(PNGLIBS) \ - $(ZLIBLIBS) $(CHARCONVLIBS) + $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS) objs = dcm2pnm.o dcmquant.o dcmscale.o progs = dcm2pnm dcmquant dcmscale @@ -31,13 +31,13 @@ progs = dcm2pnm dcmquant dcmscale all: $(progs) dcm2pnm: dcm2pnm.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcmquant: dcmquant.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcmscale: dcmscale.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) install: all diff --git a/dcmimage/apps/dcm2pnm.cc b/dcmimage/apps/dcm2pnm.cc index 454497cb..c5467498 100644 --- a/dcmimage/apps/dcm2pnm.cc +++ b/dcmimage/apps/dcm2pnm.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1996-2016, OFFIS e.V. + * Copyright (C) 1996-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,10 +26,6 @@ #define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/dcmdata/dctk.h" /* for various dcmdata headers */ #include "dcmtk/dcmdata/cmdlnarg.h" /* for prepareCmdLineArgs */ #include "dcmtk/dcmdata/dcuid.h" /* for dcmtk version name */ diff --git a/dcmimage/apps/dcmquant.cc b/dcmimage/apps/dcmquant.cc index e36d1256..8be1cc85 100644 --- a/dcmimage/apps/dcmquant.cc +++ b/dcmimage/apps/dcmquant.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2014, OFFIS e.V. + * Copyright (C) 2001-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,10 +26,6 @@ #define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/dcmdata/dctk.h" /* for various dcmdata headers */ #include "dcmtk/dcmdata/cmdlnarg.h" /* for prepareCmdLineArgs */ #include "dcmtk/dcmdata/dcuid.h" /* for dcmtk version name */ @@ -90,7 +86,7 @@ int main(int argc, char *argv[]) OFCmdUnsignedInt opt_frame = 1; /* default: first frame */ OFCmdUnsignedInt opt_frameCount = 0; /* default: all frames */ - OFBool opt_palette_ow = OFFalse; + OFBool opt_palette_ow = OFTrue; OFBool opt_entries_word = OFFalse; OFBool opt_palette_fs = OFFalse; OFCmdUnsignedInt opt_palette_col = 256; @@ -166,8 +162,11 @@ int main(int argc, char *argv[]) cmd.addOption("--mc-color-avgpixel", "+Cp", "average pixels in box"); cmd.addOption("--mc-color-center", "+Cc", "select center of box"); + cmd.addSubGroup("color palette value representation:"); + cmd.addOption("--write-ow", "+pw", "write Palette LUT as OW (default)"); + cmd.addOption("--write-us", "+pu", "write Palette LUT as US (retired)"); + cmd.addSubGroup("color palette creation:"); - cmd.addOption("--write-ow", "+pw", "write Palette LUT as OW instead of US"); cmd.addOption("--lut-entries-word", "+pe", "write Palette LUT with 16-bit entries"); cmd.addOption("--floyd-steinberg", "+pf", "use Floyd-Steinberg error diffusion"); cmd.addOption("--colors", "+pc", 1, "number of colors: 2..65536 (default 256)", @@ -298,7 +297,11 @@ int main(int argc, char *argv[]) cmd.endOptionBlock(); #endif + cmd.beginOptionBlock(); if (cmd.findOption("--write-ow")) opt_palette_ow = OFTrue; + if (cmd.findOption("--write-us")) opt_palette_ow = OFFalse; + cmd.endOptionBlock(); + if (cmd.findOption("--lut-entries-word")) opt_entries_word = OFTrue; if (cmd.findOption("--floyd-steinberg")) opt_palette_fs = OFTrue; if (cmd.findOption("--colors")) cmd.getValueAndCheckMinMax(opt_palette_col, 2, 65536); diff --git a/dcmimage/apps/dcmscale.cc b/dcmimage/apps/dcmscale.cc index 12145c85..cfb07545 100644 --- a/dcmimage/apps/dcmscale.cc +++ b/dcmimage/apps/dcmscale.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2014, OFFIS e.V. + * Copyright (C) 2002-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,10 +26,6 @@ #define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/dcmdata/dctk.h" /* for various dcmdata headers */ #include "dcmtk/dcmdata/cmdlnarg.h" /* for prepareCmdLineArgs */ #include "dcmtk/dcmdata/dcuid.h" /* for dcmtk version name */ diff --git a/dcmimage/docs/dcm2pnm.man b/dcmimage/docs/dcm2pnm.man index 52ab5379..cbd48576 100644 --- a/dcmimage/docs/dcm2pnm.man +++ b/dcmimage/docs/dcm2pnm.man @@ -6,13 +6,13 @@ \page dcm2pnm dcm2pnm: Convert DICOM images to PGM/PPM, PNG, TIFF or BMP \endif -\section synopsis SYNOPSIS +\section dcm2pnm_synopsis SYNOPSIS \verbatim dcm2pnm [options] dcmfile-in [bitmap-out] \endverbatim -\section description DESCRIPTION +\section dcm2pnm_description DESCRIPTION The \b dcm2pnm utility reads a DICOM image, converts the pixel data according to the selected image processing options and writes back an image in the @@ -21,7 +21,7 @@ Windows BMP format. This utility only supports uncompressed and RLE compressed DICOM images. The command line tool \b dcmj2pnm also supports a number of JPEG compression schemes. -\section parameters PARAMETERS +\section dcm2pnm_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be converted @@ -29,9 +29,9 @@ dcmfile-in DICOM input filename to be converted bitmap-out output filename to be written (default: stdout) \endverbatim -\section options OPTIONS +\section dcm2pnm_options OPTIONS -\subsection general_options general options +\subsection dcm2pnm_general_options general options \verbatim -h --help print this help text and exit @@ -59,7 +59,7 @@ bitmap-out output filename to be written (default: stdout) use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcm2pnm_input_options input options \verbatim input file format: @@ -90,7 +90,7 @@ input transfer syntax: read with implicit VR little endian TS \endverbatim -\subsection image_processing_options image processing options +\subsection dcm2pnm_image_processing_options image processing options \verbatim frame selection: @@ -338,7 +338,7 @@ other transformations: clip image region (l, t, w, h) \endverbatim -\subsection output_options output options +\subsection dcm2pnm_output_options output options \verbatim general: @@ -392,7 +392,7 @@ image format: write 16-bit (monochrome) or 48-bit (color) PNG \endverbatim -\section notes NOTES +\section dcm2pnm_notes NOTES The following preferred interpolation algorithms can be selected using the \e --interpolate option: @@ -413,7 +413,7 @@ and compiled with support for the external \b libpng PNG library. Option \e --interlace enables progressive image view while loading the PNG file. Only a few applications take care of the meta info (TEXT) in a PNG file. -\section transfer_syntaxes TRANSFER SYNTAXES +\section dcm2pnm_transfer_syntaxes TRANSFER SYNTAXES \b dcm2pnm supports the following transfer syntaxes for input (\e dcmfile-in): @@ -427,7 +427,7 @@ RLELosslessTransferSyntax 1.2.840.10008.1.2.5 (*) if compiled with zlib support enabled -\section logging LOGGING +\section dcm2pnm_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -446,7 +446,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcm2pnm_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -468,7 +468,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcm2pnm_environment ENVIRONMENT The \b dcm2pnm utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -484,18 +484,18 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section files FILES +\section dcm2pnm_files FILES \/camera.lut - sample characteristics file of a camera \n\/monitor.lut - sample characteristics file of a monitor \n\/printer.lut - sample characteristics file of a printer \n\/scanner.lut - sample characteristics file of a scanner -\section see_also SEE ALSO +\section dcm2pnm_see_also SEE ALSO dcmj2pnm(1), img2dcm(1) -\section copyright COPYRIGHT +\section dcm2pnm_copyright COPYRIGHT Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmimage/docs/dcmquant.man b/dcmimage/docs/dcmquant.man index 0f446e30..af50d5a1 100644 --- a/dcmimage/docs/dcmquant.man +++ b/dcmimage/docs/dcmquant.man @@ -6,20 +6,20 @@ \page dcmquant dcmquant: Convert DICOM color images to palette color \endif -\section synopsis SYNOPSIS +\section dcmquant_synopsis SYNOPSIS \verbatim dcmquant [options] dcmfile-in dcmfile-out \endverbatim -\section description DESCRIPTION +\section dcmquant_description DESCRIPTION The \b dcmquant utility reads a DICOM color image, computes a palette color look-up table of the desired size for this image (based on the median cut algorithm published by Paul Heckbert) and converts the color image into a DICOM palette color image. -\section parameters PARAMETERS +\section dcmquant_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be converted @@ -27,9 +27,9 @@ dcmfile-in DICOM input filename to be converted dcmfile-out DICOM output filename to be written \endverbatim -\section options OPTIONS +\section dcmquant_options OPTIONS -\subsection general_options general options +\subsection dcmquant_general_options general options \verbatim -h --help print this help text and exit @@ -57,7 +57,7 @@ dcmfile-out DICOM output filename to be written use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmquant_input_options input options \verbatim input file format: @@ -88,7 +88,7 @@ input transfer syntax: read with implicit VR little endian TS \endverbatim -\subsection processing_options image processing and encoding options +\subsection dcmquant_processing_options image processing and encoding options \verbatim frame selection: @@ -123,10 +123,15 @@ median cut representative color selection: +Cc --mc-color-center select center of box -color palette creation: +color palette value representation: +pw --write-ow - write Palette LUT as OW instead of US + write Palette LUT as OW (default) + + +pu --write-us + write Palette LUT as US (retired) + +color palette creation: +pe --lut-entries-word write Palette LUT with 16-bit entries @@ -155,9 +160,8 @@ SOP Instance UID: never assign new UID \endverbatim -\subsection output_options output options +\subsection dcmquant_output_options output options \verbatim - output file format: +F --write-file @@ -221,7 +225,7 @@ data set trailing padding (not with --write-dataset): multiple of i bytes \endverbatim -\section logging LOGGING +\section dcmquant_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -240,7 +244,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmquant_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -262,7 +266,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmquant_environment ENVIRONMENT The \b dcmquant utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -278,8 +282,8 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section copyright COPYRIGHT +\section dcmquant_copyright COPYRIGHT -Copyright (C) 2001-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. +Copyright (C) 2001-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. */ diff --git a/dcmimage/docs/dcmscale.man b/dcmimage/docs/dcmscale.man index 75a218cc..bec7e6da 100644 --- a/dcmimage/docs/dcmscale.man +++ b/dcmimage/docs/dcmscale.man @@ -6,19 +6,19 @@ \page dcmscale dcmscale: Scale DICOM images \endif -\section synopsis SYNOPSIS +\section dcmscale_synopsis SYNOPSIS \verbatim dcmscale [options] dcmfile-in dcmfile-out \endverbatim -\section description DESCRIPTION +\section dcmscale_description DESCRIPTION The \b dcmscale utility reads a DICOM image, scales it according to the command line settings and writes back the DICOM image. This utility only supports uncompressed and RLE compressed DICOM images. -\section parameters PARAMETERS +\section dcmscale_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be scaled @@ -26,9 +26,9 @@ dcmfile-in DICOM input filename to be scaled dcmfile-out DICOM output filename to be written \endverbatim -\section options OPTIONS +\section dcmscale_options OPTIONS -\subsection general_options general options +\subsection dcmscale_general_options general options \verbatim -h --help print this help text and exit @@ -56,7 +56,7 @@ dcmfile-out DICOM output filename to be written use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmscale_input_options input options \verbatim input file format: @@ -87,7 +87,7 @@ input transfer syntax: read with implicit VR little endian TS \endverbatim -\subsection processing_options image processing and encoding options +\subsection dcmscale_processing_options image processing and encoding options \verbatim scaling: @@ -132,7 +132,7 @@ SOP Instance UID: never assign new SOP Instance UID \endverbatim -\subsection output_options output options +\subsection dcmscale_output_options output options \verbatim output file format: @@ -197,7 +197,7 @@ data set trailing padding (not with --write-dataset): multiple of i bytes \endverbatim -\section notes NOTES +\section dcmscale_notes NOTES The following preferred interpolation algorithms can be selected using the \e --interpolate option: @@ -207,7 +207,7 @@ The following preferred interpolation algorithms can be selected using the \li 3 = magnification algorithm with bilinear interpolation from Eduard Stanescu \li 4 = magnification algorithm with bicubic interpolation from Eduard Stanescu -\section logging LOGGING +\section dcmscale_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -226,7 +226,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmscale_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -248,7 +248,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmscale_environment ENVIRONMENT The \b dcmscale utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -264,7 +264,7 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section copyright COPYRIGHT +\section dcmscale_copyright COPYRIGHT Copyright (C) 2002-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmimage/include/CMakeLists.txt b/dcmimage/include/CMakeLists.txt index aaf8525a..e8dbcd6f 100644 --- a/dcmimage/include/CMakeLists.txt +++ b/dcmimage/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmimage DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmimage DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmimage/libsrc/Makefile.dep b/dcmimage/libsrc/Makefile.dep index 40edbddc..0b482cb8 100644 --- a/dcmimage/libsrc/Makefile.dep +++ b/dcmimage/libsrc/Makefile.dep @@ -18,7 +18,10 @@ diargimg.o: diargimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -36,10 +39,10 @@ diargimg.o: diargimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -98,7 +101,10 @@ dicmyimg.o: dicmyimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -116,10 +122,10 @@ dicmyimg.o: dicmyimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmimage/dicmyimg.h ../include/dcmtk/dcmimage/dicoimg.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \ @@ -169,7 +175,10 @@ dicoimg.o: dicoimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -187,10 +196,10 @@ dicoimg.o: dicoimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -261,7 +270,10 @@ dicoopx.o: dicoopx.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -279,10 +291,10 @@ dicoopx.o: dicoopx.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \ ../include/dcmtk/dcmimage/dicdefin.h \ ../../dcmimgle/include/dcmtk/dcmimgle/dipixel.h @@ -306,7 +318,10 @@ dicopx.o: dicopx.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -324,10 +339,10 @@ dicopx.o: dicopx.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -378,7 +393,10 @@ dihsvimg.o: dihsvimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -396,10 +414,10 @@ dihsvimg.o: dihsvimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmimage/dihsvimg.h ../include/dcmtk/dcmimage/dicoimg.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \ @@ -449,7 +467,10 @@ dilogger.o: dilogger.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -467,10 +488,10 @@ dilogger.o: dilogger.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmimage/dicdefin.h dipalimg.o: dipalimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -492,7 +513,10 @@ dipalimg.o: dipalimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -510,10 +534,10 @@ dipalimg.o: dipalimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -572,7 +596,10 @@ dipipng.o: dipipng.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -590,10 +617,10 @@ dipipng.o: dipipng.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -639,7 +666,10 @@ dipitiff.o: dipitiff.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -657,10 +687,10 @@ dipitiff.o: dipitiff.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -722,7 +752,10 @@ diqtctab.o: diqtctab.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -738,9 +771,9 @@ diqtctab.o: diqtctab.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -770,7 +803,8 @@ diqtfs.o: diqtfs.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h diqthash.o: diqthash.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimage/diqthash.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ @@ -799,7 +833,10 @@ diqthash.o: diqthash.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -816,10 +853,10 @@ diqthash.o: diqthash.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -891,7 +928,10 @@ diquant.o: diquant.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -909,9 +949,9 @@ diquant.o: diquant.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmimage/diqttype.h \ ../include/dcmtk/dcmimage/dicdefin.h ../include/dcmtk/dcmimage/diqtid.h \ @@ -981,7 +1021,10 @@ diregist.o: diregist.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -999,10 +1042,10 @@ diregist.o: diregist.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \ ../include/dcmtk/dcmimage/dicdefin.h \ ../include/dcmtk/dcmimage/dipalimg.h ../include/dcmtk/dcmimage/dicoimg.h \ @@ -1068,7 +1111,10 @@ dirgbimg.o: dirgbimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1086,10 +1132,10 @@ dirgbimg.o: dirgbimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmimage/dirgbimg.h ../include/dcmtk/dcmimage/dicoimg.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \ @@ -1139,7 +1185,10 @@ diybrimg.o: diybrimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1157,10 +1206,10 @@ diybrimg.o: diybrimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmimage/diybrimg.h ../include/dcmtk/dcmimage/dicoimg.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \ @@ -1215,7 +1264,10 @@ diyf2img.o: diyf2img.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1233,10 +1285,10 @@ diyf2img.o: diyf2img.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmimage/diyf2img.h ../include/dcmtk/dcmimage/dicoimg.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \ @@ -1291,7 +1343,10 @@ diyp2img.o: diyp2img.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1309,10 +1364,10 @@ diyp2img.o: diyp2img.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmimage/diyp2img.h ../include/dcmtk/dcmimage/dicoimg.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \ diff --git a/dcmimage/libsrc/diqthash.cc b/dcmimage/libsrc/diqthash.cc index 5d13f7d4..6464b90f 100644 --- a/dcmimage/libsrc/diqthash.cc +++ b/dcmimage/libsrc/diqthash.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2002-2016, OFFIS e.V. + * Copyright (C) 2002-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -43,7 +43,7 @@ unsigned long DcmQuantColorHashTable::countEntries() const { unsigned long result = 0; for (const_table_iterator it = m_Table.begin(); it != m_Table.end(); ++it) - if (*it) result += (*it)->size(); + if (*it) result += OFstatic_cast(unsigned long, (*it)->size()); return result; } diff --git a/dcmimgle/CMakeLists.txt b/dcmimgle/CMakeLists.txt index a60c171a..80fc0ece 100644 --- a/dcmimgle/CMakeLists.txt +++ b/dcmimgle/CMakeLists.txt @@ -2,7 +2,7 @@ PROJECT(dcmimgle) # declare include directories which hold for all subdirectories -INCLUDE_DIRECTORIES(${dcmimgle_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${ZLIB_INCDIR}) +INCLUDE_DIRECTORIES("${dcmimgle_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" ${ZLIB_INCDIR}) # recurse into subdirectories FOREACH(SUBDIR libsrc apps include data) diff --git a/dcmimgle/apps/Makefile.dep b/dcmimgle/apps/Makefile.dep index 9639ef87..63764a07 100644 --- a/dcmimgle/apps/Makefile.dep +++ b/dcmimgle/apps/Makefile.dep @@ -19,7 +19,10 @@ dcmdspfn.o: dcmdspfn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -37,10 +40,10 @@ dcmdspfn.o: dcmdspfn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -68,8 +71,6 @@ dcmdspfn.o: dcmdspfn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -144,6 +145,7 @@ dconvlum.o: dconvlum.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ diff --git a/dcmimgle/apps/Makefile.in b/dcmimgle/apps/Makefile.in index 61669cb9..cb876bb2 100644 --- a/dcmimgle/apps/Makefile.in +++ b/dcmimgle/apps/Makefile.in @@ -18,7 +18,7 @@ dcmdatadir = $(top_srcdir)/../dcmdata LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include -I$(dcmdatadir)/include LIBDIRS = -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc -L$(oflogdir)/libsrc -L$(dcmdatadir)/libsrc -LOCALLIBS = -ldcmimgle -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS) +LOCALLIBS = -ldcmimgle -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS) objs = dconvlum.o dcmdspfn.o dcod2lum.o progs = dconvlum dcmdspfn dcod2lum @@ -27,13 +27,13 @@ progs = dconvlum dcmdspfn dcod2lum all: $(progs) dconvlum: dconvlum.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcmdspfn: dcmdspfn.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcod2lum: dcod2lum.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) install: all diff --git a/dcmimgle/apps/dcmdspfn.cc b/dcmimgle/apps/dcmdspfn.cc index 7f3f978a..725d3235 100644 --- a/dcmimgle/apps/dcmdspfn.cc +++ b/dcmimgle/apps/dcmdspfn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1999-2014, OFFIS e.V. + * Copyright (C) 1999-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -22,10 +22,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" diff --git a/dcmimgle/data/CMakeLists.txt b/dcmimgle/data/CMakeLists.txt index c08733ee..fc17af8d 100644 --- a/dcmimgle/data/CMakeLists.txt +++ b/dcmimgle/data/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES camera.lut monitor.lut printer.lut scanner.lut DESTINATION ${DCMTK_INSTALL_DATDIR} COMPONENT data) +INSTALL(FILES camera.lut monitor.lut printer.lut scanner.lut DESTINATION "${DCMTK_INSTALL_DATDIR}" COMPONENT data) diff --git a/dcmimgle/docs/dcmdspfn.man b/dcmimgle/docs/dcmdspfn.man index a1d91af8..92c4a5e6 100644 --- a/dcmimgle/docs/dcmdspfn.man +++ b/dcmimgle/docs/dcmdspfn.man @@ -6,13 +6,13 @@ \page dcmdspfn dcmdspfn: Export standard display curves to a text file \endif -\section synopsis SYNOPSIS +\section dcmdspfn_synopsis SYNOPSIS \verbatim dcmdspfn [options] \endverbatim -\section description DESCRIPTION +\section dcmdspfn_description DESCRIPTION Command line program converts a DCMTK monitor / camera / printer / scanner characteristics file to tabbed text file describing the characteristic curve @@ -22,15 +22,15 @@ sheet program. Above that the display curve (without CC and PSC) can also be computed for a specified luminance/OD range (min/max) and a certain number of Digital Driving Levels (DDL). -\section parameters PARAMETERS +\section dcmdspfn_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be dumped \endverbatim -\section options OPTIONS +\section dcmdspfn_options OPTIONS -\subsection general_options general options +\subsection dcmdspfn_general_options general options \verbatim -h --help print this help text and exit @@ -58,7 +58,7 @@ dcmfile-in DICOM input filename to be dumped use config file f for the logger \endverbatim -\subsection input_options input options (mutually exclusive) +\subsection dcmdspfn_input_options input options (mutually exclusive) \verbatim +Im --monitor-file [f]ilename: string text file describing the monitor characteristics @@ -80,7 +80,7 @@ dcmfile-in DICOM input filename to be dumped automatically converted to luminance \endverbatim -\subsection creation_options creation options +\subsection dcmdspfn_creation_options creation options \verbatim +Ca --ambient-light [a]mbient light: float ambient light value (cd/m^2, default: file f) @@ -103,7 +103,7 @@ dcmfile-in DICOM input filename to be dumped (0..99, default: file setting or cubic spline) \endverbatim -\subsection output_options output options +\subsection dcmdspfn_output_options output options \verbatim +Og --gsdf [f]ilename: string write GSDF curve data to file f @@ -112,7 +112,7 @@ dcmfile-in DICOM input filename to be dumped write CIELAB curve data to file f \endverbatim -\section notes NOTES +\section dcmdspfn_notes NOTES The output file describing the CC, GSDF or CIELAB and PSC for an 8 bit display system (monitor, camera, printer or scanner) is a simple text file. Lines @@ -142,7 +142,7 @@ The \e data folder contains sample characteristics file for monitors, cameras, printers and scanners. See DICOM standard part 14 for more details on display calibration and Barten's model (including GSDF). -\section logging LOGGING +\section dcmdspfn_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -161,7 +161,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmdspfn_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -183,18 +183,18 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section files FILES +\section dcmdspfn_files FILES \/camera.lut - sample characteristics file of a camera \n\/monitor.lut - sample characteristics file of a monitor \n\/printer.lut - sample characteristics file of a printer \n\/scanner.lut - sample characteristics file of a scanner -\section see_also SEE ALSO +\section dcmdspfn_see_also SEE ALSO dconvlum(1), dcod2lum(1) -\section copyright COPYRIGHT +\section dcmdspfn_copyright COPYRIGHT Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmimgle/docs/dcod2lum.man b/dcmimgle/docs/dcod2lum.man index e86f21af..bed4c544 100644 --- a/dcmimgle/docs/dcod2lum.man +++ b/dcmimgle/docs/dcod2lum.man @@ -6,13 +6,13 @@ \page dcod2lum dcod2lum: Convert hardcopy characteristic curve file to softcopy format \endif -\section synopsis SYNOPSIS +\section dcod2lum_synopsis SYNOPSIS \verbatim dcod2lum in-file out-file \endverbatim -\section description DESCRIPTION +\section dcod2lum_description DESCRIPTION Command line program that converts a hardcopy characteristic curve file to softcopy format. In other words, the measured optical density (OD) values @@ -29,7 +29,7 @@ and \e L0 the illumination (both measured in cd/m^2), 'D' the optical density file (keyword \e lum) all optical density values are mapped to a constant luminance. -\section parameters PARAMETERS +\section dcod2lum_parameters PARAMETERS \verbatim in-file hardcopy characteristic curve file to be converted @@ -37,24 +37,24 @@ in-file hardcopy characteristic curve file to be converted out-file softcopy characteristic curve file to be written \endverbatim -\section notes NOTES +\section dcod2lum_notes NOTES The format of both input and output file is described the documentation of the \b dcmdspfn command line tool. In addition, the \e data folder contains sample characteristics file monitors, cameras, printers and scanners. -\section files FILES +\section dcod2lum_files FILES \/camera.lut - sample characteristics file of a camera \n\/monitor.lut - sample characteristics file of a monitor \n\/printer.lut - sample characteristics file of a printer \n\/scanner.lut - sample characteristics file of a scanner -\section see_also SEE ALSO +\section dcod2lum_see_also SEE ALSO dcmdspfn(1) -\section copyright COPYRIGHT +\section dcod2lum_copyright COPYRIGHT Copyright (C) 2002-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmimgle/docs/dconvlum.man b/dcmimgle/docs/dconvlum.man index 60b752aa..4db83171 100644 --- a/dcmimgle/docs/dconvlum.man +++ b/dcmimgle/docs/dconvlum.man @@ -6,20 +6,20 @@ \page dconvlum dconvlum: Convert VeriLUM files to DCMTK display files \endif -\section synopsis SYNOPSIS +\section dconvlum_synopsis SYNOPSIS \verbatim dconvlum in-file out-file [ambient] \endverbatim -\section description DESCRIPTION +\section dconvlum_description DESCRIPTION Command line program that converts VeriLUM file with characteristic curve data (\e CCx_xx.dat) to a format used for the Barten transformation in this toolkit. VeriLUM is a calibration package from ImageSmiths consisting of a photometer (with serial RS232 connector) and a Windows NT software. -\section parameters PARAMETERS +\section dconvlum_parameters PARAMETERS \verbatim in-file VeriLUM characteristic curve file to be converted @@ -29,7 +29,7 @@ out-file DCMTK display file to be written ambient ambient light (cd/m^2, floating point value) \endverbatim -\section notes NOTES +\section dconvlum_notes NOTES The output file describing the characteristic curve of a display system (monitor) is a simple text file. Lines starting with a '#' are treated as @@ -48,12 +48,12 @@ values are calculated by cubic spline interpolation. See DICOM standard part 14 for more details on display calibration and Barten's model (including GSDF). -\section see_also SEE ALSO +\section dconvlum_see_also SEE ALSO dcmdspfn(1), dcm2pnm(1) -\section copyright COPYRIGHT +\section dconvlum_copyright COPYRIGHT Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. -*/ \ No newline at end of file +*/ diff --git a/dcmimgle/include/CMakeLists.txt b/dcmimgle/include/CMakeLists.txt index 5c2663e3..5d67d80b 100644 --- a/dcmimgle/include/CMakeLists.txt +++ b/dcmimgle/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmimgle DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmimgle DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmimgle/libsrc/Makefile.dep b/dcmimgle/libsrc/Makefile.dep index 534af905..54cfad37 100644 --- a/dcmimgle/libsrc/Makefile.dep +++ b/dcmimgle/libsrc/Makefile.dep @@ -18,7 +18,10 @@ dcmimage.o: dcmimage.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -36,10 +39,10 @@ dcmimage.o: dcmimage.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -98,7 +101,10 @@ dibaslut.o: dibaslut.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -116,10 +122,10 @@ dibaslut.o: dibaslut.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmimgle/didefine.h diciefn.o: diciefn.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/diciefn.h ../include/dcmtk/dcmimgle/didispfn.h \ @@ -146,7 +152,10 @@ diciefn.o: diciefn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -164,10 +173,10 @@ diciefn.o: diciefn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h dicielut.o: dicielut.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/dicielut.h \ ../include/dcmtk/dcmimgle/didislut.h \ @@ -191,7 +200,10 @@ dicielut.o: dicielut.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -209,10 +221,10 @@ dicielut.o: dicielut.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmimgle/didefine.h didislut.o: didislut.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/didislut.h \ @@ -236,7 +248,10 @@ didislut.o: didislut.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -254,10 +269,10 @@ didislut.o: didislut.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmimgle/didefine.h didispfn.o: didispfn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ @@ -286,7 +301,10 @@ didispfn.o: didispfn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -304,10 +322,10 @@ didispfn.o: didispfn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h didocu.o: didocu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -329,7 +347,10 @@ didocu.o: didocu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -347,10 +368,10 @@ didocu.o: didocu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -378,8 +399,6 @@ didocu.o: didocu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -449,7 +468,10 @@ digsdfn.o: digsdfn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -467,10 +489,10 @@ digsdfn.o: digsdfn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h digsdlut.o: digsdlut.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmimgle/digsdlut.h \ ../include/dcmtk/dcmimgle/didislut.h \ @@ -494,7 +516,10 @@ digsdlut.o: digsdlut.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -512,10 +537,10 @@ digsdlut.o: digsdlut.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmimgle/didefine.h \ ../include/dcmtk/dcmimgle/displint.h diimage.o: diimage.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -538,7 +563,10 @@ diimage.o: diimage.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -556,10 +584,10 @@ diimage.o: diimage.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -612,7 +640,10 @@ diinpx.o: diinpx.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -630,10 +661,10 @@ diinpx.o: diinpx.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmimgle/didefine.h diluptab.o: diluptab.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ @@ -654,6 +685,7 @@ diluptab.o: diluptab.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -672,7 +704,9 @@ diluptab.o: diluptab.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -720,7 +754,10 @@ dimo1img.o: dimo1img.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -738,10 +775,10 @@ dimo1img.o: dimo1img.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmimgle/dimo1img.h ../include/dcmtk/dcmimgle/dimoimg.h \ ../include/dcmtk/dcmimgle/diimage.h \ @@ -785,7 +822,10 @@ dimo2img.o: dimo2img.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -803,10 +843,10 @@ dimo2img.o: dimo2img.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmimgle/dimo2img.h ../include/dcmtk/dcmimgle/dimoimg.h \ ../include/dcmtk/dcmimgle/diimage.h \ @@ -850,7 +890,10 @@ dimoimg.o: dimoimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -868,10 +911,10 @@ dimoimg.o: dimoimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -929,6 +972,7 @@ dimoimg3.o: dimoimg3.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -941,7 +985,9 @@ dimoimg3.o: dimoimg3.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -999,6 +1045,7 @@ dimoimg4.o: dimoimg4.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1011,7 +1058,9 @@ dimoimg4.o: dimoimg4.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1069,6 +1118,7 @@ dimoimg5.o: dimoimg5.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1081,7 +1131,9 @@ dimoimg5.o: dimoimg5.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1146,7 +1198,10 @@ dimomod.o: dimomod.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1164,10 +1219,10 @@ dimomod.o: dimomod.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmimgle/didefine.h \ ../include/dcmtk/dcmimgle/diobjcou.h ../include/dcmtk/dcmimgle/didocu.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -1206,7 +1261,10 @@ dimoopx.o: dimoopx.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1224,10 +1282,10 @@ dimoopx.o: dimoopx.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmimgle/didefine.h ../include/dcmtk/dcmimgle/dimopx.h \ ../include/dcmtk/dcmimgle/dipixel.h ../include/dcmtk/dcmimgle/dimomod.h \ ../include/dcmtk/dcmimgle/diluptab.h \ @@ -1256,7 +1314,10 @@ dimopx.o: dimopx.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1274,10 +1335,10 @@ dimopx.o: dimopx.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmimgle/didefine.h ../include/dcmtk/dcmimgle/dimomod.h \ ../include/dcmtk/dcmimgle/diluptab.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -1305,7 +1366,10 @@ diovdat.o: diovdat.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1323,10 +1387,10 @@ diovdat.o: diovdat.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmimgle/diovlay.h ../include/dcmtk/dcmimgle/diobjcou.h \ ../include/dcmtk/dcmimgle/didefine.h ../include/dcmtk/dcmimgle/diovdat.h \ @@ -1352,7 +1416,10 @@ diovlay.o: diovlay.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1370,10 +1437,10 @@ diovlay.o: diovlay.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmimgle/diovlay.h ../include/dcmtk/dcmimgle/diobjcou.h \ ../include/dcmtk/dcmimgle/didefine.h ../include/dcmtk/dcmimgle/diovdat.h \ @@ -1419,7 +1486,10 @@ diovlimg.o: diovlimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1437,10 +1507,10 @@ diovlimg.o: diovlimg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmimgle/diovlimg.h \ ../include/dcmtk/dcmimgle/dimo2img.h ../include/dcmtk/dcmimgle/dimoimg.h \ @@ -1491,7 +1561,10 @@ diovpln.o: diovpln.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1509,10 +1582,10 @@ diovpln.o: diovpln.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -1557,7 +1630,10 @@ diutils.o: diutils.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1575,9 +1651,9 @@ diutils.o: diutils.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmimgle/diutils.h ../include/dcmtk/dcmimgle/didefine.h diff --git a/dcmiod/CMakeLists.txt b/dcmiod/CMakeLists.txt index 58c13d50..07e691f4 100644 --- a/dcmiod/CMakeLists.txt +++ b/dcmiod/CMakeLists.txt @@ -2,7 +2,7 @@ PROJECT(dcmiod) # declare include directories which hold for all subdirectories -INCLUDE_DIRECTORIES(${dcmiod_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${ZLIB_INCDIR}) +INCLUDE_DIRECTORIES("${dcmiod_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" ${ZLIB_INCDIR}) # recurse into subdirectories FOREACH(SUBDIR libsrc include tests) diff --git a/dcmiod/include/CMakeLists.txt b/dcmiod/include/CMakeLists.txt index 35db5574..1499d79e 100644 --- a/dcmiod/include/CMakeLists.txt +++ b/dcmiod/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmiod DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE) +INSTALL(DIRECTORY dcmtk/dcmiod DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h" PATTERN "CVS" EXCLUDE) diff --git a/dcmiod/include/dcmtk/dcmiod/iodcommn.h b/dcmiod/include/dcmtk/dcmiod/iodcommn.h index 0e3dc975..a9c88193 100644 --- a/dcmiod/include/dcmtk/dcmiod/iodcommn.h +++ b/dcmiod/include/dcmtk/dcmiod/iodcommn.h @@ -176,13 +176,18 @@ public: * @param readSeries Read Series-level information if OFTrue, always * includes Frame of Reference, i.e.\ readFoR is * considered to be OFTrue + * @param takeOverCharset If OFTrue (default), Specific Character Set is + * taken over from imported dataset. If it's not + * present or empty (invalid), the attribute will + * not be present in this class either. * @return EC_Normal if successful, an error code otherwise */ virtual OFCondition import(DcmItem& dataset, - OFBool readPatient, - OFBool readStudy, - OFBool readFoR = OFFalse, - OFBool readSeries = OFFalse); + const OFBool readPatient, + const OFBool readStudy, + const OFBool readFoR = OFFalse, + const OFBool readSeries = OFFalse, + const OFBool takeOverCharset = OFTrue); /** Import common module attributes from DICOM file but only read Patient, Study, * Series and/or Frame of Reference level portions. The current content @@ -196,6 +201,11 @@ public: * @param useStudy If OFTrue, Study level information is imported * @param useSeries If OFTrue, Series level information is imported * @param useFoR If OFTrue, Frame of Reference information is imported + * @param takeOverCharset If OFTrue (default), Specific Character Set is + * taken over from imported dataset. If it's not + * present or empty (invalid), the attribute will + * not be present in this class either. + * @return EC_Normal if reading was successful (i.e.\ if any information could * be read), otherwise an error is returned */ @@ -203,7 +213,8 @@ public: const OFBool usePatient, const OFBool useStudy, const OFBool useSeries, - const OFBool useFoR = OFFalse); + const OFBool useFoR = OFFalse, + OFBool takeOverCharset = OFTrue); /** Import common module attributes from DICOM file but only read Patient, Study, * Series and/or Frame of Reference level portions. The current content @@ -214,6 +225,10 @@ public: * @param useStudy If OFTrue, Study level information is imported * @param useSeries If OFTrue, Series level information is imported * @param useFoR If OFTrue, Frame of Reference information is imported + * @param takeOverCharset If OFTrue (default), Specific Character Set is + * taken over from imported dataset. If it's not + * present or empty (invalid), the attribute will + * not be present in this class either. * @return EC_Normal if reading was successful (i.e.\ if any information could * be read), otherwise an error is returned */ @@ -221,7 +236,8 @@ public: const OFBool usePatient, const OFBool useStudy, const OFBool useSeries, - const OFBool useFoR = OFFalse); + const OFBool useFoR = OFFalse, + const OFBool takeOverCharset = OFTrue); /** Write the attributes managed by this class to DICOM dataset. diff --git a/dcmiod/include/dcmtk/dcmiod/iodimage.h b/dcmiod/include/dcmtk/dcmiod/iodimage.h index 7760c4b8..26957512 100644 --- a/dcmiod/include/dcmtk/dcmiod/iodimage.h +++ b/dcmiod/include/dcmtk/dcmiod/iodimage.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, Open Connections GmbH + * Copyright (C) 2015-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -43,7 +43,7 @@ class IODImagePixelModule; * Modules supported on top of DcmIODCommon: General Image Module and * Image Pixel Module. */ -#ifdef DCMTK_USE_CXX11_STL +#ifdef HAVE_CXX11 template struct DcmIODImageHasType : std::false_type {}; @@ -72,7 +72,7 @@ public: /** A good comment would be nice, but I have nothing in mind */ -#ifdef DCMTK_USE_CXX11_STL +#ifdef HAVE_CXX11 using IODImagePixelModuleType = IODImagePixelVariant; #else typedef IODImagePixelVariant IODImagePixelModuleType; @@ -182,7 +182,7 @@ public: private: template -#ifdef DCMTK_USE_CXX11_STL +#ifdef HAVE_CXX11 typename std::enable_if::value,OFCondition>::type #else OFTypename OFenable_if @@ -199,7 +199,7 @@ private: } template -#ifdef DCMTK_USE_CXX11_STL +#ifdef HAVE_CXX11 typename std::enable_if::value,OFCondition>::type #else OFTypename OFenable_if @@ -214,7 +214,7 @@ private: } template -#ifdef DCMTK_USE_CXX11_STL +#ifdef HAVE_CXX11 typename std::enable_if::value,OFCondition>::type #else OFTypename OFenable_if @@ -231,7 +231,7 @@ private: } template -#ifdef DCMTK_USE_CXX11_STL +#ifdef HAVE_CXX11 typename std::enable_if::value,OFCondition>::type #else OFTypename OFenable_if @@ -271,7 +271,7 @@ private: } template -#ifdef DCMTK_USE_CXX11_STL +#ifdef HAVE_CXX11 typename std::enable_if::value,OFCondition>::type #else OFTypename OFenable_if @@ -286,7 +286,7 @@ private: } template -#ifdef DCMTK_USE_CXX11_STL +#ifdef HAVE_CXX11 typename std::enable_if::value,OFCondition>::type #else OFTypename OFenable_if diff --git a/dcmiod/include/dcmtk/dcmiod/iodutil.h b/dcmiod/include/dcmtk/dcmiod/iodutil.h index 8de4ef81..37a7851a 100644 --- a/dcmiod/include/dcmtk/dcmiod/iodutil.h +++ b/dcmiod/include/dcmtk/dcmiod/iodutil.h @@ -211,6 +211,7 @@ public: * @param type Value type (valid value: "1", "1C", "2", something else) * @param searchCond Optional flag indicating the status of a previous 'search' function call * @param moduleName Optional module name to be printed (default: "IOD" if NULL) + * @param logLevel The log level to log errors to * @return EC_Normal if element value is correct, error otherwise */ static OFCondition checkElementValue(const DcmElement *delem, @@ -218,7 +219,8 @@ public: const OFString &vm, const OFString &type, const OFCondition &searchCond = EC_Normal, - const char *moduleName = NULL); + const char *moduleName = NULL, + const dcmtk::log4cplus::LogLevel logLevel = dcmtk::log4cplus::WARN_LOG_LEVEL); /** Check element value for correct value multiplicity and type. * @param delem DICOM element to be checked @@ -228,13 +230,15 @@ public: * @param type Value type (valid value: "1", "1C", "2", something else) * @param searchCond Optional flag indicating the status of a previous 'search' function call * @param moduleName Optional module name to be printed (default: "IOD" if NULL) + * @param logLevel The log level to log errors to * @return EC_Normal if element value is correct, error otherwise */ static OFCondition checkElementValue(const DcmElement &delem, const OFString &vm, const OFString &type, const OFCondition &searchCond = EC_Normal, - const char *moduleName = NULL); + const char *moduleName = NULL, + const dcmtk::log4cplus::LogLevel logLevel = dcmtk::log4cplus::WARN_LOG_LEVEL); /** Get string value from element * @param delem DICOM element from which the string value should be retrieved @@ -354,7 +358,7 @@ public: for (size_t count = 0; (count < vm) && result.good(); count ++) { Uint8 value; - result = elem->getUint8(value, count); + result = elem->getUint8(value, OFstatic_cast(unsigned long, count)); if ( result.good() ) { destination.push_back(value); @@ -544,7 +548,7 @@ public: { OFCondition result; /* Check sequence, reports cardinality and type errors as warnings */ - checkSubSequence(result, source, seqKey, "1", type, module); + checkSubSequence(result, source, seqKey, "1", type, module, dcmtk::log4cplus::WARN_LOG_LEVEL); /* Try to read sequence into internal data (ignore errors as much as possible) */ DcmItem* item = NULL; @@ -602,7 +606,6 @@ public: * i.e.\ "1,1C,2,2C or 3". * @param module Name of the module/macro this sequence is contained in. Used * for error messages and can also be left empty. - * @return EC_Normal if successful, an error code otherwise */ template static void writeSubSequence(OFCondition& result, @@ -661,7 +664,7 @@ public: } // Check result - checkSubSequence(result, destination, seqKey, cardinality, type, module); + checkSubSequence(result, destination, seqKey, cardinality, type, module, dcmtk::log4cplus::ERROR_LOG_LEVEL); // Clean up if we did not have success */ if (result.bad()) @@ -683,7 +686,6 @@ public: * @param rule Rule describing the requirements for this sequence. If NULL * an error is returned (IOD_EC_NoSuchRule), but no error error is reported * to the logger. - * @return EC_Normal if successful, an error code otherwise */ template static void writeSubSequence(OFCondition& result, @@ -720,7 +722,6 @@ public: * i.e.\ "1,1C,2,2C or 3". * @param module Name of the module/macro this sequence is contained in. * Used for error messages and can also be left empty. - * @return EC_Normal if successful, an error code otherwise */ template static void writeSingleItem(OFCondition& result, @@ -769,7 +770,7 @@ public: DCMIOD_TRACE("Skipping type 3 sequence " << seqKey << ": No data or incomplete data available"); } /* Check outcome */ - checkSubSequence(result, destination, seqKey, "1", type, module); + checkSubSequence(result, destination, seqKey, "1", type, module, dcmtk::log4cplus::ERROR_LOG_LEVEL); } } @@ -784,7 +785,6 @@ public: * @param destination The DICOM item that should hold the sequence * (with a single item) in the end. * @param rule The rule for writing the given sequence - * @return EC_Normal if successful, an error code otherwise */ template static void writeSingleItem(OFCondition& result, @@ -821,14 +821,15 @@ public: * i.e.\ "1,1C,2,2C or 3". * @param module Name of the module/macro this sequence is contained in. * Used for error messages and can also be left empty. - * @return EC_Normal if successful, an error code otherwise + * @param logLevel The log level to write errors to */ static void checkSubSequence(OFCondition& result, DcmItem& surroundingItem, const DcmTagKey& seqKey, const OFString& cardinality, const OFString& type, - const OFString& module); + const OFString& module, + const dcmtk::log4cplus::LogLevel logLevel); /** Deletes all elements from given container and calls "delete" on each * of them to clear memory. diff --git a/dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h b/dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h index 43368a25..23dccbab 100644 --- a/dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h +++ b/dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h @@ -42,6 +42,9 @@ * > Study Instance UID (UI, 1, 1) * > Series and Instance Reference Macro * + * Thus the Common Instance Reference Module lists references to other SOP + * instances and divides them between those instances that are in the same + * study, and those that are inside another study. */ class DCMTK_DCMIOD_EXPORT IODCommonInstanceReferenceModule : public IODModule { @@ -74,12 +77,19 @@ public: /** Add references * @param references The references to be added - * @param studyInstanceUID The Study Instance UID the references belong to - * @param clearOldData Delete any old referneces if OFTrue, otherwise keep them + * @param studyInstanceUID The Study Instance UID of "this" object instance. + * It's used to decide whether the provided instances (with their + * own Study Instance UIDs) will go into the Referenced Series Sequence + * or into the Studies Containing Other Referenced Instances Sequence. + * If it is left empty, then the method tries to find "this" instances + * Study Instance UID in the internal item container which may be shared + * with other modules and thus may already provide the Study Instance + * UID (e.g. via General Study Module). + * @param clearOldData Delete any old references if OFTrue, otherwise keep them * @result EC_Normal if successful, error otherwise */ virtual size_t addReferences(const IODReferences& references, - const OFString& studyInstanceUID, + const OFString& studyInstanceUID = "", const OFBool clearOldData = OFTrue); /** Read data of this module from given source item diff --git a/dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h b/dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h index d6a5ba22..c4adb545 100644 --- a/dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h +++ b/dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016, Open Connections GmbH + * Copyright (C) 2016-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -55,7 +55,7 @@ struct IODImagePixelVariantBaseVisitor * The class Image Pixel Module, the Floating Point Image Pixel module * and the Double Floating Point Image Pixel module */ -#ifdef DCMTK_USE_CXX11_STL +#ifdef HAVE_CXX11 template class IODImagePixelVariant : public OFvariant diff --git a/dcmiod/libsrc/Makefile.dep b/dcmiod/libsrc/Makefile.dep index 944fe001..4c4ce168 100644 --- a/dcmiod/libsrc/Makefile.dep +++ b/dcmiod/libsrc/Makefile.dep @@ -34,7 +34,7 @@ iodcommn.o: iodcommn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -53,9 +53,9 @@ iodcommn.o: iodcommn.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmiod/modpatient.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ @@ -162,7 +162,10 @@ iodcontentitemmacro.o: iodcontentitemmacro.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -180,10 +183,10 @@ iodcontentitemmacro.o: iodcontentitemmacro.cc \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -207,11 +210,8 @@ iodcontentitemmacro.o: iodcontentitemmacro.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \ ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmiod/iodcontentitemmacro.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../include/dcmtk/dcmiod/modbase.h ../include/dcmtk/dcmiod/iodmacro.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ @@ -279,7 +279,10 @@ iodmacro.o: iodmacro.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -297,10 +300,10 @@ iodmacro.o: iodmacro.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -328,8 +331,6 @@ iodmacro.o: iodmacro.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -373,9 +374,7 @@ iodmacro.o: iodmacro.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmiod/iodrules.h ../include/dcmtk/dcmiod/iodtypes.h \ ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \ - ../include/dcmtk/dcmiod/modbase.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ - ../include/dcmtk/dcmiod/iodutil.h \ + ../include/dcmtk/dcmiod/modbase.h ../include/dcmtk/dcmiod/iodutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h iodreferences.o: iodreferences.cc \ ../../config/include/dcmtk/config/osconfig.h \ @@ -398,7 +397,10 @@ iodreferences.o: iodreferences.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -416,10 +418,10 @@ iodreferences.o: iodreferences.cc \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmiod/iodreferences.h \ ../include/dcmtk/dcmiod/iodutil.h \ @@ -444,8 +446,6 @@ iodreferences.o: iodreferences.cc \ ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \ @@ -481,7 +481,7 @@ iodrules.o: iodrules.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -500,6 +500,7 @@ iodrules.o: iodrules.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -533,7 +534,10 @@ iodtypes.o: iodtypes.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -551,10 +555,10 @@ iodtypes.o: iodtypes.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h @@ -578,7 +582,10 @@ iodutil.o: iodutil.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -596,10 +603,10 @@ iodutil.o: iodutil.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmiod/iodutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ @@ -621,8 +628,6 @@ iodutil.o: iodutil.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftime.h \ ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/cielabutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ @@ -657,7 +662,10 @@ modacquisitioncontext.o: modacquisitioncontext.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -675,10 +683,10 @@ modacquisitioncontext.o: modacquisitioncontext.cc \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -706,8 +714,6 @@ modacquisitioncontext.o: modacquisitioncontext.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -751,9 +757,7 @@ modacquisitioncontext.o: modacquisitioncontext.cc \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../include/dcmtk/dcmiod/iodrules.h ../include/dcmtk/dcmiod/iodtypes.h \ ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \ - ../include/dcmtk/dcmiod/modbase.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ - ../include/dcmtk/dcmiod/iodutil.h \ + ../include/dcmtk/dcmiod/modbase.h ../include/dcmtk/dcmiod/iodutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h modbase.o: modbase.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmiod/modbase.h \ @@ -776,6 +780,7 @@ modbase.o: modbase.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -787,7 +792,6 @@ modbase.o: modbase.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -851,7 +855,6 @@ modcommoninstanceref.o: modcommoninstanceref.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -872,6 +875,7 @@ modcommoninstanceref.o: modcommoninstanceref.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -978,7 +982,7 @@ modenhequipment.o: modenhequipment.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -997,8 +1001,8 @@ modenhequipment.o: modenhequipment.cc \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmiod/cielabutil.h ../include/dcmtk/dcmiod/modbase.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -1046,6 +1050,7 @@ modenhusimage.o: modenhusimage.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1057,7 +1062,6 @@ modenhusimage.o: modenhusimage.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1179,7 +1183,6 @@ modenhusseries.o: modenhusseries.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1198,6 +1201,7 @@ modenhusseries.o: modenhusseries.cc \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmiod/iodmacro.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ @@ -1300,7 +1304,7 @@ modequipment.o: modequipment.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1319,8 +1323,8 @@ modequipment.o: modequipment.cc \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmiod/cielabutil.h ../include/dcmtk/dcmiod/modbase.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -1369,6 +1373,7 @@ modfloatingpointimagepixel.o: modfloatingpointimagepixel.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1380,7 +1385,6 @@ modfloatingpointimagepixel.o: modfloatingpointimagepixel.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1440,6 +1444,7 @@ modfor.o: modfor.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1451,7 +1456,6 @@ modfor.o: modfor.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1523,7 +1527,7 @@ modgeneralimage.o: modgeneralimage.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1542,9 +1546,9 @@ modgeneralimage.o: modgeneralimage.cc \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmiod/modbase.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -1598,6 +1602,7 @@ modgeneralseries.o: modgeneralseries.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1609,7 +1614,6 @@ modgeneralseries.o: modgeneralseries.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1720,6 +1724,7 @@ modgeneralstudy.o: modgeneralstudy.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1731,7 +1736,6 @@ modgeneralstudy.o: modgeneralstudy.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1837,6 +1841,7 @@ modhelp.o: modhelp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1849,7 +1854,9 @@ modhelp.o: modhelp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1900,6 +1907,7 @@ modimagepixel.o: modimagepixel.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1911,7 +1919,6 @@ modimagepixel.o: modimagepixel.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1975,6 +1982,7 @@ modimagepixelbase.o: modimagepixelbase.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -1986,7 +1994,6 @@ modimagepixelbase.o: modimagepixelbase.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2058,7 +2065,7 @@ modmultiframedimension.o: modmultiframedimension.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2077,9 +2084,9 @@ modmultiframedimension.o: modmultiframedimension.cc \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmiod/ioddef.h ../include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmiod/modbase.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -2124,6 +2131,7 @@ modmultiframefg.o: modmultiframefg.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -2143,7 +2151,9 @@ modmultiframefg.o: modmultiframefg.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2168,11 +2178,8 @@ modmultiframefg.o: modmultiframefg.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmiod/iodrules.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \ ../include/dcmtk/dcmiod/cielabutil.h ../include/dcmtk/dcmiod/modbase.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \ ../../ofstd/include/dcmtk/ofstd/oftime.h \ @@ -2208,7 +2215,6 @@ modpatient.o: modpatient.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2229,6 +2235,7 @@ modpatient.o: modpatient.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2330,7 +2337,6 @@ modpatientstudy.o: modpatientstudy.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2351,6 +2357,7 @@ modpatientstudy.o: modpatientstudy.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2450,7 +2457,6 @@ modsegmentationseries.o: modsegmentationseries.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2471,6 +2477,7 @@ modsegmentationseries.o: modsegmentationseries.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2566,6 +2573,7 @@ modsopcommon.o: modsopcommon.cc \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -2577,7 +2585,6 @@ modsopcommon.o: modsopcommon.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2647,6 +2654,7 @@ modsynchronization.o: modsynchronization.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -2658,7 +2666,6 @@ modsynchronization.o: modsynchronization.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2725,6 +2732,7 @@ modusfor.o: modusfor.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -2736,7 +2744,6 @@ modusfor.o: modusfor.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ diff --git a/dcmiod/libsrc/cielabutil.cc b/dcmiod/libsrc/cielabutil.cc index 8b03051d..77082bd5 100755 --- a/dcmiod/libsrc/cielabutil.cc +++ b/dcmiod/libsrc/cielabutil.cc @@ -24,6 +24,11 @@ #define INCLUDE_CMATH // for pow() function #include "dcmtk/ofstd/ofstdinc.h" +// workaround for SunPro not defining these C functions in the global namespace +#ifdef __sun +using STD_NAMESPACE pow; +#endif + // Initialize white points of D65 light point (CIELab standard white point) const double IODCIELabUtil::D65_WHITEPOINT_X = 0.950456; const double IODCIELabUtil::D65_WHITEPOINT_Y = 1.0; diff --git a/dcmiod/libsrc/iodcommn.cc b/dcmiod/libsrc/iodcommn.cc index 03c7f976..195bf502 100644 --- a/dcmiod/libsrc/iodcommn.cc +++ b/dcmiod/libsrc/iodcommn.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015-2016, Open Connections GmbH + * Copyright (C) 2015-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -40,13 +40,14 @@ DcmIODCommon::DcmIODCommon() { // Set initial values for a new SOP instance ensureInstanceUIDs(OFFalse); + // push this first so Specific Character Set will be written in the beginning + m_Modules.push_back(&m_SOPCommon); m_Modules.push_back(&m_Patient); m_Modules.push_back(&m_PatientStudy); m_Modules.push_back(&m_Study); m_Modules.push_back(&m_Equipment); m_Modules.push_back(&m_Series); m_Modules.push_back(&m_FrameOfReference); - m_Modules.push_back(&m_SOPCommon); m_Modules.push_back(&m_CommonInstanceReferenceModule); } @@ -66,13 +67,14 @@ DcmIODCommon::DcmIODCommon(const DcmIODCommon& rhs) { // Set initial values for a new SOP instance ensureInstanceUIDs(OFFalse); + // push this first so Specific Character Set will be written in the beginning + m_Modules.push_back(&m_SOPCommon); m_Modules.push_back(&m_Patient); m_Modules.push_back(&m_PatientStudy); m_Modules.push_back(&m_Study); m_Modules.push_back(&m_Equipment); m_Modules.push_back(&m_Series); m_Modules.push_back(&m_FrameOfReference); - m_Modules.push_back(&m_SOPCommon); m_Modules.push_back(&m_CommonInstanceReferenceModule); } @@ -173,10 +175,11 @@ OFCondition DcmIODCommon::read(DcmItem &dataset) OFCondition DcmIODCommon::import(DcmItem& dataset, - OFBool readPatient, - OFBool readStudy, - OFBool readSeries, - OFBool readFoR) + const OFBool readPatient, + const OFBool readStudy, + const OFBool readFoR, + const OFBool readSeries, + const OFBool takeOverCharset) { if (readPatient) { @@ -201,6 +204,27 @@ OFCondition DcmIODCommon::import(DcmItem& dataset, m_FrameOfReference.read(dataset, OFFalse /* do not clear old data */); } + // Take over character set from the dataset imported, if desired + if (takeOverCharset) + { + OFString charset; + dataset.findAndGetOFStringArray(DCM_SpecificCharacterSet, charset); + if (!charset.empty()) + { + DCMIOD_DEBUG("Taking over Specific Character Set " << charset << " on import"); + OFCondition result = m_SOPCommon.setSpecificCharacterSet(charset); + if (result.bad()) + { + DCMIOD_ERROR("Could not set Specific Character Set " << charset << " on import: " << result.text()); + } + } + else + { + DCMIOD_DEBUG("Taking over Default Specific Character Set (ASCII) on import"); + m_SOPCommon.getData().findAndDeleteElement(DCM_SpecificCharacterSet); + } + } + return EC_Normal; } @@ -209,10 +233,11 @@ OFCondition DcmIODCommon::importPatientStudyFoR(const OFString& filename, const OFBool usePatient, const OFBool useStudy, const OFBool useSeries, - const OFBool useFoR) + const OFBool useFoR, + const OFBool takeOverCharset) { DCMIOD_WARN("This function is deprecated and will be removed in later versions of DCMTK, please use import()"); - return import(filename, usePatient, useStudy, useSeries, useFoR); + return import(filename, usePatient, useStudy, useSeries, useFoR, takeOverCharset); } @@ -220,7 +245,8 @@ OFCondition DcmIODCommon::import(const OFString& filename, const OFBool usePatient, const OFBool useStudy, const OFBool useSeries, - const OFBool useFoR) + const OFBool useFoR, + const OFBool takeOverCharset) { DcmFileFormat dcmff; OFCondition result = dcmff.loadFile(filename.c_str()); @@ -229,7 +255,7 @@ OFCondition DcmIODCommon::import(const OFString& filename, DcmDataset *dset = dcmff.getDataset(); if (dset != NULL) { - result = import(*dset, usePatient, useStudy, useSeries, useFoR); + result = import(*dset, usePatient, useStudy, useSeries, useFoR, takeOverCharset); } else { diff --git a/dcmiod/libsrc/iodreferences.cc b/dcmiod/libsrc/iodreferences.cc index 8294c5c4..285f5ba7 100755 --- a/dcmiod/libsrc/iodreferences.cc +++ b/dcmiod/libsrc/iodreferences.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016, Open Connections GmbH + * Copyright (C) 2016-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -131,8 +131,8 @@ OFCondition IODReferences::readTractographyReferencedInstanceSequence(DcmItem& s DcmElement* elem = NULL; if (item->findAndGetElement(DCM_ReferencedFrameNumber, elem).good()) { - Uint32 vm = elem->getVM(); - for (Uint32 f = 0; f < vm; f++) + unsigned long vm = elem->getVM(); + for (unsigned long f = 0; f < vm; f++) { Sint32 val = 0; if (elem->getSint32(val, f).good()) @@ -190,7 +190,7 @@ OFCondition IODReferences::writeTractographyReferencedInstanceSequence(DcmItem& { if (result.good()) { - result = item.findOrCreateSequenceItem(DCM_ReferencedInstanceSequence, seqItem, numItem); + result = item.findOrCreateSequenceItem(DCM_ReferencedInstanceSequence, seqItem, OFstatic_cast(long, numItem)); numItem++; } if (result.good()) diff --git a/dcmiod/libsrc/iodutil.cc b/dcmiod/libsrc/iodutil.cc index 4e6e507a..ca18755e 100644 --- a/dcmiod/libsrc/iodutil.cc +++ b/dcmiod/libsrc/iodutil.cc @@ -52,12 +52,12 @@ OFCondition DcmIODUtil::getAndCheckElementFromDataset(DcmItem &dataset, /* copy object from search stack */ result = delem.copyFrom(*stack.top()); /* we need a reference to the original element in order to determine the SpecificCharacterSet */ - checkElementValue(OFstatic_cast(DcmElement *, stack.top()), tagKey, vm, type, result, moduleName); + checkElementValue(OFstatic_cast(DcmElement *, stack.top()), tagKey, vm, type, result, moduleName, dcmtk::log4cplus::WARN_LOG_LEVEL); } /* the element could not be found in the dataset */ else { - checkElementValue(delem, vm, type, result, moduleName); + checkElementValue(delem, vm, type, result, moduleName, dcmtk::log4cplus::WARN_LOG_LEVEL); } return result; } @@ -80,11 +80,11 @@ OFCondition DcmIODUtil::getAndCheckElementFromDataset(DcmItem &dataset, /* copy object from search stack */ delem = OFstatic_cast ( DcmElement*, stack.top()->clone() ); /* we need a reference to the original element in order to determine the SpecificCharacterSet */ - checkElementValue(OFstatic_cast(DcmElement *, stack.top()), tagKey, vm, type, result, moduleName); + checkElementValue(OFstatic_cast(DcmElement *, stack.top()), tagKey, vm, type, result, moduleName, dcmtk::log4cplus::WARN_LOG_LEVEL); } /* the element could not be found in the dataset */ else - checkElementValue(delem, tagKey, vm, type, result, moduleName); + checkElementValue(delem, tagKey, vm, type, result, moduleName, dcmtk::log4cplus::WARN_LOG_LEVEL); return result; } @@ -186,19 +186,29 @@ OFCondition DcmIODUtil::addElementToDataset(OFCondition &result, // At this point, we certainly have an element. Check its value (empty ok for type 2) if ((type == "2") || !delem->isEmpty()) { - result = checkElementValue(*delem, rule->getVM(), type, result, rule->getModule().c_str()); - // Insert non-empty element or empty "type 2" element + // Insert non-empty element or empty "type 2" element. First, perform the insertion, and then + // check the value. This is (at least) required for checking the character set of string values which + // relies on the element context, i.e. the surrounding item or dataset. + result = dataset.insert(delem, OFTrue /*replaceOld*/); if (result.good()) { - result = dataset.insert(delem, OFTrue /*replaceOld*/); - if (result.good()) insertionOK = OFTrue; + result = checkElementValue(*delem, rule->getVM(), type, result, rule->getModule().c_str(), dcmtk::log4cplus::ERROR_LOG_LEVEL); + } + if (result.good()) + { + insertionOK = OFTrue; + } + // remove element if value is invalid + else + { + dataset.remove(delem); } } else if (type == "1") { // Empty element value not allowed for "type 1" result = EC_InvalidValue; - checkElementValue(*delem, rule->getVM(), type, result, rule->getModule().c_str()); + checkElementValue(*delem, rule->getVM(), type, result, rule->getModule().c_str(), dcmtk::log4cplus::ERROR_LOG_LEVEL); } } else @@ -242,15 +252,17 @@ OFCondition DcmIODUtil::checkElementValue(const DcmElement *delem, const OFString &vm, const OFString &type, const OFCondition &searchCond, - const char *moduleName) + const char *moduleName, + const dcmtk::log4cplus::LogLevel logLevel) { OFCondition result = EC_Normal; const OFString tagName = DcmTag(tagKey).getTagName(); const OFString module = (moduleName == NULL) ? "IOD" : moduleName; + OFOStringStream error; /* NB: type 1C and 2C cannot be checked, assuming to be optional */ if (((type == "1") || (type == "2")) && searchCond.bad()) { - DCMIOD_WARN(tagName << " " << tagKey << " absent in " << module << " (type " << type << ")"); + error << tagName << " " << tagKey << " absent in " << module << " (type " << type << ")"; result = IOD_EC_MissingAttribute; } else if ((delem == NULL) || OFconst_cast(DcmElement*, delem)->isEmpty(OFTrue /*normalize*/)) // cast away constness of delem; value modification can happen (eg. to remove padding) @@ -258,34 +270,49 @@ OFCondition DcmIODUtil::checkElementValue(const DcmElement *delem, /* however, type 1C should never be present with empty value */ if (((type == "1") || (type == "1C")) && searchCond.good()) { - DCMIOD_WARN(tagName << " " << tagKey << " empty in " << module << " (type " << type << ")"); + error << tagName << " " << tagKey << " empty in " << module << " (type " << type << ")"; result = EC_MissingValue; } } else { result = OFconst_cast(DcmElement*, delem)->checkValue(vm, OFTrue /*oldFormat*/); // cast away constness of delem; value modification can happen (eg. to remove padding) if (result == EC_InvalidCharacter) { - DCMIOD_WARN(tagName << " " << tagKey << " contains invalid character(s) in " << module); + error << tagName << " " << tagKey << " contains invalid character(s) in " << module; } else if (result == EC_ValueRepresentationViolated) { - DCMIOD_WARN(tagName << " " << tagKey << " violates VR definition in " << module); + error << tagName << " " << tagKey << " violates VR definition in " << module; } else if (result == EC_ValueMultiplicityViolated) { const OFString vmText = (delem->getVR() == EVR_SQ) ? " #items" : " VM"; - DCMIOD_WARN(tagName << " " << tagKey << vmText << " != " << vm << " in " << module); + error << tagName << " " << tagKey << vmText << " != " << vm << " in " << module; } else if (result == EC_MaximumLengthViolated) { - DCMIOD_WARN(tagName << " " << tagKey << " violates maximum VR length in " << module); + error << tagName << " " << tagKey << " violates maximum VR length in " << module; } else if (result.bad()) { - DCMIOD_WARN("INTERNAL ERROR while checking value of " << tagName << " " << tagKey << " in " << module); + error << "INTERNAL ERROR while checking value of " << tagName << " " << tagKey << " in " << module; result = EC_Normal; } } + OFSTRINGSTREAM_GETSTR(error, tmpString) + if (strlen(tmpString) > 0) + { + switch (logLevel) + { + case dcmtk::log4cplus::TRACE_LOG_LEVEL: DCMIOD_TRACE(tmpString); break; + case dcmtk::log4cplus::DEBUG_LOG_LEVEL: DCMIOD_DEBUG(tmpString); break; + case dcmtk::log4cplus::WARN_LOG_LEVEL : DCMIOD_WARN(tmpString); break; + case dcmtk::log4cplus::INFO_LOG_LEVEL : DCMIOD_INFO(tmpString); break; + case dcmtk::log4cplus::ERROR_LOG_LEVEL : DCMIOD_ERROR(tmpString); break; + case dcmtk::log4cplus::FATAL_LOG_LEVEL: DCMIOD_FATAL(tmpString); break; + default: DCMIOD_WARN(tmpString);; + } + } + OFSTRINGSTREAM_FREESTR(tmpString) return result; } @@ -294,10 +321,11 @@ OFCondition DcmIODUtil::checkElementValue(const DcmElement &delem, const OFString &vm, const OFString &type, const OFCondition &searchCond, - const char *moduleName) + const char *moduleName, + const dcmtk::log4cplus::LogLevel logLevel) { /* call the real function */ - return checkElementValue(&delem, delem.getTag(), vm, type, searchCond, moduleName); + return checkElementValue(&delem, delem.getTag(), vm, type, searchCond, moduleName, logLevel); } @@ -401,7 +429,7 @@ OFCondition DcmIODUtil::setUint16ValuesOnElement(DcmElement &delem, } else if (check) { - result = DcmElement::checkVM(values.size(), vm); + result = DcmElement::checkVM(OFstatic_cast(unsigned long, values.size()), vm); } it++; } @@ -418,7 +446,7 @@ OFCondition DcmIODUtil::getUint16ValuesFromElement(DcmElement &delem, for (size_t i = 0; i < count; i++) { Uint16 val; - result = delem.getUint16(val, i); + result = delem.getUint16(val, OFstatic_cast(unsigned long, i)); if (result.bad()) { DCMIOD_WARN(delem.getTag().getXTag() << ": Getting value " << " #" << i << " not possible"); @@ -435,7 +463,8 @@ void DcmIODUtil::checkSubSequence(OFCondition& result, const DcmTagKey& seqKey, const OFString& cardinality, const OFString& type, - const OFString& module) + const OFString& module, + const dcmtk::log4cplus::LogLevel logLevel) { OFCondition exists = EC_Normal; /* check result */ @@ -443,7 +472,7 @@ void DcmIODUtil::checkSubSequence(OFCondition& result, { DcmSequenceOfItems *seq = NULL; exists = surroundingItem.findAndGetSequence(seqKey, seq); - result = DcmIODUtil::checkElementValue(seq, seqKey, cardinality, type, exists, module.c_str()); + result = DcmIODUtil::checkElementValue(seq, seqKey, cardinality, type, exists, module.c_str(), logLevel); } } @@ -464,7 +493,7 @@ OFCondition DcmIODUtil::getAndCheckSingleItem(DcmSequenceOfItems& seq, } // get actual tag name and cardinality - const Uint32 card = seq.card(); + const unsigned long card = seq.card(); if (card != 1) { if (card > 1) diff --git a/dcmiod/libsrc/modbase.cc b/dcmiod/libsrc/modbase.cc index 27943f0d..9ecde195 100644 --- a/dcmiod/libsrc/modbase.cc +++ b/dcmiod/libsrc/modbase.cc @@ -140,7 +140,7 @@ void IODComponent::makeOptional() OFCondition IODComponent::read(DcmItem& source, - OFBool clearOldData) + const OFBool clearOldData) { // Debug DCMIOD_DEBUG("Reading component: " << getName()); @@ -212,7 +212,7 @@ OFCondition IODComponent::read(DcmItem& source, { DcmElement *elem = NULL; OFCondition cond = source.findAndGetElement( (*rule)->getTagKey(), elem); - DcmIODUtil::checkElementValue(elem, (*rule)->getTagKey(), (*rule)->getVM(), (*rule)->getType(), cond, (*rule)->getModule().c_str()); + DcmIODUtil::checkElementValue(elem, (*rule)->getTagKey(), (*rule)->getVM(), (*rule)->getType(), cond, (*rule)->getModule().c_str(), dcmtk::log4cplus::WARN_LOG_LEVEL); } else // Normal attributes are checked and copied over into this IOD component { diff --git a/dcmiod/libsrc/modhelp.cc b/dcmiod/libsrc/modhelp.cc index a68325e7..44ee4231 100644 --- a/dcmiod/libsrc/modhelp.cc +++ b/dcmiod/libsrc/modhelp.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2015, Open Connections GmbH + * Copyright (C) 2015-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -39,7 +39,7 @@ const DcmTagKey DcmModuleHelpers::patientModuleTags[] = DCM_QualityControlSubject, DCM_ReferencedPatientSequence, DCM_PatientBirthTime, - DCM_OtherPatientIDs, + DCM_RETIRED_OtherPatientIDs, DCM_OtherPatientIDsSequence, DCM_OtherPatientNames, DCM_EthnicGroup, diff --git a/dcmiod/libsrc/modimagepixel.cc b/dcmiod/libsrc/modimagepixel.cc index 6343c5d6..8d0b7b20 100644 --- a/dcmiod/libsrc/modimagepixel.cc +++ b/dcmiod/libsrc/modimagepixel.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2016, Open Connections GmbH + * Copyright (C) 2016-2017, Open Connections GmbH * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation are maintained by @@ -255,7 +255,7 @@ template OFCondition IODImagePixelModule::setICCProfile(const Uint8* values, const size_t length) { - return m_Item->putAndInsertUint8Array(DCM_ICCProfile, values, length); + return m_Item->putAndInsertUint8Array(DCM_ICCProfile, values, OFstatic_cast(unsigned long, length)); } template class IODImagePixelModule; diff --git a/dcmiod/libsrc/modmultiframedimension.cc b/dcmiod/libsrc/modmultiframedimension.cc index ad8e1beb..caa3521f 100644 --- a/dcmiod/libsrc/modmultiframedimension.cc +++ b/dcmiod/libsrc/modmultiframedimension.cc @@ -267,7 +267,7 @@ DcmElement* IODMultiframeDimensionModule::getIndexElement(DcmSequenceOfItems *pe DcmElement *returnValue = NULL; for (size_t count = 0; count < numFrames; count++) { - DcmItem* item = perFrameFG->getItem(count); + DcmItem* item = perFrameFG->getItem(OFstatic_cast(unsigned long, count)); if (item != NULL) { // Check for the functional group mentioned in dimension diff --git a/dcmiod/libsrc/modusfor.cc b/dcmiod/libsrc/modusfor.cc index c124ca3e..9058d5d6 100644 --- a/dcmiod/libsrc/modusfor.cc +++ b/dcmiod/libsrc/modusfor.cc @@ -213,7 +213,7 @@ OFCondition IODUSFoRModule::setVolumetoTransducerMappingMatrix(const OFVector< F { for (size_t n = 0; result.good() && n < vm; n++) { - result = elem->putFloat64(value[n], n); + result = elem->putFloat64(value[n], OFstatic_cast(unsigned long, n)); } } if (result.good()) @@ -262,7 +262,7 @@ OFCondition IODUSFoRModule::setVolumeToTableMappingMatrix(const OFVector< Float6 { for (size_t n = 0; result.good() && (n < vm); n++) { - result = elem->putFloat64(value[n], n); + result = elem->putFloat64(value[n], OFstatic_cast(unsigned long, n)); } } if (result.good()) diff --git a/dcmiod/tests/Makefile.dep b/dcmiod/tests/Makefile.dep index facbdd69..72634ea2 100644 --- a/dcmiod/tests/Makefile.dep +++ b/dcmiod/tests/Makefile.dep @@ -19,6 +19,7 @@ tcielabutil.o: tcielabutil.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -32,7 +33,9 @@ tcielabutil.o: tcielabutil.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -64,6 +67,7 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -77,7 +81,9 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -109,6 +115,7 @@ timagepixel.o: timagepixel.cc \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -122,7 +129,9 @@ timagepixel.o: timagepixel.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -134,8 +143,6 @@ timagepixel.o: timagepixel.cc \ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \ ../../oflog/include/dcmtk/oflog/tracelog.h \ ../include/dcmtk/dcmiod/iodimage.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../ofstd/include/dcmtk/ofstd/ofvriant.h \ ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \ ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \ @@ -151,7 +158,6 @@ timagepixel.o: timagepixel.cc \ ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \ ../include/dcmtk/dcmiod/cielabutil.h \ ../include/dcmtk/dcmiod/modpatient.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ diff --git a/dcmiod/tests/Makefile.in b/dcmiod/tests/Makefile.in index ced94174..4b8699bb 100644 --- a/dcmiod/tests/Makefile.in +++ b/dcmiod/tests/Makefile.in @@ -17,11 +17,12 @@ oflogdir = $(top_srcdir)/../oflog dcmdatadir = $(top_srcdir)/../dcmdata dcmioddir = $(top_srcdir)/../dcmiod -LOCALINCLUDES = -I$(dcmioddir)/include -I$(dcmdatadir)/include -I$(oflogdir)/include -I$(ofstddir)/include +LOCALINCLUDES = -I$(dcmioddir)/include -I$(dcmdatadir)/include -I$(oflogdir)/include \ + -I$(ofstddir)/include LIBDIRS = -L$(top_srcdir)/libsrc -L$(dcmioddir)/libsrc -L$(dcmdatadir)/libsrc \ -L$(oflogdir)/libsrc -L$(ofstddir)/libsrc LOCALLIBS = -ldcmiod -ldcmdata -loflog -lofstd \ - $(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) + $(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS) test_objs = tests.o tcielabutil.o timagepixel.o objs = tests.o $(test_objs) @@ -30,9 +31,6 @@ progs = tests all: $(progs) -tclabutil: tclabutil.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) - tests: $(test_objs) $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $(test_objs) $(LOCALLIBS) $(LIBS) diff --git a/dcmjpeg/apps/CMakeLists.txt b/dcmjpeg/apps/CMakeLists.txt index 8e244251..9a93bebf 100644 --- a/dcmjpeg/apps/CMakeLists.txt +++ b/dcmjpeg/apps/CMakeLists.txt @@ -1,5 +1,5 @@ # declare additional include directories -INCLUDE_DIRECTORIES(${dcmjpeg_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${dcmimage_SOURCE_DIR}/include ${ZLIB_INCDIR} ${LIBTIFF_INCDIR} ${LIBPNG_INCDIR}) +INCLUDE_DIRECTORIES("${dcmjpeg_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" "${dcmimage_SOURCE_DIR}/include" ${ZLIB_INCDIR} ${LIBTIFF_INCDIR} ${LIBPNG_INCDIR}) # declare executables FOREACH(PROGRAM dcmcjpeg dcmdjpeg dcmj2pnm dcmmkdir) diff --git a/dcmjpeg/apps/Makefile.dep b/dcmjpeg/apps/Makefile.dep index be75e57e..1b8ae549 100644 --- a/dcmjpeg/apps/Makefile.dep +++ b/dcmjpeg/apps/Makefile.dep @@ -19,7 +19,10 @@ dcmcjpeg.o: dcmcjpeg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -37,10 +40,10 @@ dcmcjpeg.o: dcmcjpeg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -68,8 +71,6 @@ dcmcjpeg.o: dcmcjpeg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -142,7 +143,10 @@ dcmdjpeg.o: dcmdjpeg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -160,10 +164,10 @@ dcmdjpeg.o: dcmdjpeg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -191,8 +195,6 @@ dcmdjpeg.o: dcmdjpeg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -261,7 +263,10 @@ dcmj2pnm.o: dcmj2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -279,10 +284,10 @@ dcmj2pnm.o: dcmj2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -310,8 +315,6 @@ dcmj2pnm.o: dcmj2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -405,7 +408,10 @@ dcmmkdir.o: dcmmkdir.cc ../../dcmdata/apps/dcmgpdir.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -423,10 +429,10 @@ dcmmkdir.o: dcmmkdir.cc ../../dcmdata/apps/dcmgpdir.cc \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -454,8 +460,6 @@ dcmmkdir.o: dcmmkdir.cc ../../dcmdata/apps/dcmgpdir.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ diff --git a/dcmjpeg/apps/Makefile.in b/dcmjpeg/apps/Makefile.in index 36e985ef..136d83f2 100644 --- a/dcmjpeg/apps/Makefile.in +++ b/dcmjpeg/apps/Makefile.in @@ -49,7 +49,7 @@ LOCALINCLUDES = $(dcmjpeginc) $(ofstdinc) $(ofloginc) $(dcmdatainc) $(dcmimagein LIBDIRS = -L$(top_srcdir)/libsrc $(dcmjpeglibdir) $(dcmimagelibdir) $(dcmimglelibdir) \ $(dcmdatalibdir) $(ofloglibdir) $(ofstdlibdir) LOCALLIBS = $(dcmjpeglib) $(dcmimagelib) $(dcmimglelib) $(dcmdatalib) $(ofloglib) \ - $(ofstdlib) $(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) + $(ofstdlib) $(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS) objs = dcmdjpeg.o dcmcjpeg.o dcmj2pnm.o dcmmkdir.o progs = dcmdjpeg dcmcjpeg dcmj2pnm dcmmkdir @@ -58,16 +58,16 @@ progs = dcmdjpeg dcmcjpeg dcmj2pnm dcmmkdir all: $(progs) dcmdjpeg: dcmdjpeg.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcmcjpeg: dcmcjpeg.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcmj2pnm: dcmj2pnm.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcmmkdir: dcmmkdir.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) install: all diff --git a/dcmjpeg/apps/dcmcjpeg.cc b/dcmjpeg/apps/dcmcjpeg.cc index b714870d..6eaf5b57 100644 --- a/dcmjpeg/apps/dcmcjpeg.cc +++ b/dcmjpeg/apps/dcmcjpeg.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2014, OFFIS e.V. + * Copyright (C) 2001-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,10 +26,6 @@ #define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" @@ -61,11 +57,6 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" int main(int argc, char *argv[]) { -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - const char *opt_ifname = NULL; const char *opt_ofname = NULL; diff --git a/dcmjpeg/apps/dcmdjpeg.cc b/dcmjpeg/apps/dcmdjpeg.cc index da878d3f..6b7d54ff 100644 --- a/dcmjpeg/apps/dcmdjpeg.cc +++ b/dcmjpeg/apps/dcmdjpeg.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2016, OFFIS e.V. + * Copyright (C) 2001-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,10 +26,6 @@ #define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" @@ -57,11 +53,6 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" int main(int argc, char *argv[]) { -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - const char *opt_ifname = NULL; const char *opt_ofname = NULL; diff --git a/dcmjpeg/docs/dcmcjpeg.man b/dcmjpeg/docs/dcmcjpeg.man index f41886a2..d0ab0d89 100644 --- a/dcmjpeg/docs/dcmcjpeg.man +++ b/dcmjpeg/docs/dcmcjpeg.man @@ -6,19 +6,19 @@ \page dcmcjpeg dcmcjpeg: Encode DICOM file to JPEG transfer syntax \endif -\section synopsis SYNOPSIS +\section dcmcjpeg_synopsis SYNOPSIS \verbatim dcmcjpeg [options] dcmfile-in dcmfile-out \endverbatim -\section description DESCRIPTION +\section dcmcjpeg_description DESCRIPTION The \b dcmcjpeg utility reads an uncompressed DICOM image (\e dcmfile-in), performs a JPEG compression (i. e. conversion to an encapsulated DICOM transfer syntax) and writes the converted image to an output file (\e dcmfile-out). -\section parameters PARAMETERS +\section dcmcjpeg_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be converted @@ -26,9 +26,9 @@ dcmfile-in DICOM input filename to be converted dcmfile-out DICOM output filename \endverbatim -\section options OPTIONS +\section dcmcjpeg_options OPTIONS -\subsection general_options general options +\subsection dcmcjpeg_general_options general options \verbatim -h --help print this help text and exit @@ -56,7 +56,7 @@ dcmfile-out DICOM output filename use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmcjpeg_input_options input options \verbatim input file format: @@ -102,7 +102,7 @@ compatibility (ignored by +tl): # (only pseudo lossless encoder) \endverbatim -\subsection JPEG_encoding_options JPEG encoding options +\subsection dcmcjpeg_JPEG_encoding_options JPEG encoding options \verbatim JPEG process: @@ -321,7 +321,7 @@ non-standard YCbCr component subsampling (not with +tl): # interpretation is encoded as YBR_FULL_422 which violates DICOM rules. \endverbatim -\subsection enc_pix_data_encoding_opt encapsulated pixel data encoding options: +\subsection dcmcjpeg_enc_pix_data_encoding_opt encapsulated pixel data encoding options: \verbatim encapsulated pixel data fragmentation: @@ -484,7 +484,7 @@ SOP Instance UID: # Never assigns a new SOP instance UID. \endverbatim -\subsection output_options output options +\subsection dcmcjpeg_output_options output options \verbatim post-1993 value representations: @@ -526,7 +526,7 @@ data set trailing padding: and items on multiple of i bytes \endverbatim -\section notes NOTES +\section dcmcjpeg_notes NOTES The \b dcmcjpeg utility compresses DICOM images of all SOP classes. Special handling has been implemented for CT images (where the modality transformation @@ -573,7 +573,7 @@ also be distinguished by the Derivation Description in the resulting DICOM image, which contains the term "Lossless JPEG compression" for the new and "Pseudo-Lossless JPEG compression" for the old encoder. -\section transfer_syntaxes TRANSFER SYNTAXES +\section dcmcjpeg_transfer_syntaxes TRANSFER SYNTAXES \b dcmcjpeg supports the following transfer syntaxes for input (\e dcmfile-in): @@ -605,7 +605,7 @@ JPEGProcess14TransferSyntax 1.2.840.10008.1.2.4.57 JPEGProcess14SV1TransferSyntax 1.2.840.10008.1.2.4.70 \endverbatim -\section logging LOGGING +\section dcmcjpeg_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -624,7 +624,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmcjpeg_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -646,7 +646,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmcjpeg_environment ENVIRONMENT The \b dcmcjpeg utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -662,11 +662,11 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section see_also SEE ALSO +\section dcmcjpeg_see_also SEE ALSO dcmdjpeg(1) -\section copyright COPYRIGHT +\section dcmcjpeg_copyright COPYRIGHT Copyright (C) 2001-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmjpeg/docs/dcmdjpeg.man b/dcmjpeg/docs/dcmdjpeg.man index 16342072..fa8d346d 100644 --- a/dcmjpeg/docs/dcmdjpeg.man +++ b/dcmjpeg/docs/dcmdjpeg.man @@ -6,19 +6,19 @@ \page dcmdjpeg dcmdjpeg: Decode JPEG-compressed DICOM file \endif -\section synopsis SYNOPSIS +\section dcmdjpeg_synopsis SYNOPSIS \verbatim dcmdjpeg [options] dcmfile-in dcmfile-out \endverbatim -\section description DESCRIPTION +\section dcmdjpeg_description DESCRIPTION The \b dcmdjpeg utility reads a JPEG-compressed DICOM image (\e dcmfile-in), decompresses the JPEG data (i. e. conversion to a native DICOM transfer syntax) and writes the converted image to an output file (\e dcmfile-out). -\section parameters PARAMETERS +\section dcmdjpeg_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be converted @@ -26,9 +26,9 @@ dcmfile-in DICOM input filename to be converted dcmfile-out DICOM output filename \endverbatim -\section options OPTIONS +\section dcmdjpeg_options OPTIONS -\subsection general_options general options +\subsection dcmdjpeg_general_options general options \verbatim -h --help print this help text and exit @@ -56,7 +56,7 @@ dcmfile-out DICOM output filename use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmdjpeg_input_options input options \verbatim input file format: @@ -76,7 +76,7 @@ input file format: # without meta-header but unfortunately it does. \endverbatim -\subsection processing_options processing options +\subsection dcmdjpeg_processing_options processing options \verbatim color space conversion: @@ -178,7 +178,7 @@ workaround options for incorrect JPEG encodings: \endverbatim -\subsection output_options output options +\subsection dcmdjpeg_output_options output options \verbatim output file format: @@ -240,7 +240,7 @@ data set trailing padding (not with --write-dataset): and items on multiple of i bytes \endverbatim -\section transfer_syntaxes TRANSFER SYNTAXES +\section dcmdjpeg_transfer_syntaxes TRANSFER SYNTAXES \b dcmdjpeg supports the following transfer syntaxes for input (\e dcmfile-in): @@ -269,7 +269,7 @@ LittleEndianExplicitTransferSyntax 1.2.840.10008.1.2.1 BigEndianExplicitTransferSyntax 1.2.840.10008.1.2.2 \endverbatim -\section logging LOGGING +\section dcmdjpeg_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -288,7 +288,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmdjpeg_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -310,7 +310,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmdjpeg_environment ENVIRONMENT The \b dcmdjpeg utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -326,11 +326,11 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section see_also SEE ALSO +\section dcmdjpeg_see_also SEE ALSO dcmcjpeg(1) -\section copyright COPYRIGHT +\section dcmdjpeg_copyright COPYRIGHT Copyright (C) 2001-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmjpeg/docs/dcmj2pnm.man b/dcmjpeg/docs/dcmj2pnm.man index b117525a..1777f307 100644 --- a/dcmjpeg/docs/dcmj2pnm.man +++ b/dcmjpeg/docs/dcmj2pnm.man @@ -6,13 +6,13 @@ \page dcmj2pnm dcmj2pnm: Convert DICOM images to PGM/PPM, PNG, TIFF, JPEG or BMP \endif -\section synopsis SYNOPSIS +\section dcmj2pnm_synopsis SYNOPSIS \verbatim dcmj2pnm [options] dcmfile-in [bitmap-out] \endverbatim -\section description DESCRIPTION +\section dcmj2pnm_description DESCRIPTION The \b dcmj2pnm utility reads a DICOM image, converts the pixel data according to the selected image processing options and writes back an image in the @@ -20,7 +20,7 @@ well-known PGM/PPM (portable gray map / portable pix map), PNG, TIFF, JPEG (Joint Photographic Experts Group) or Windows BMP format. This utility supports uncompressed as well as JPEG and RLE compressed DICOM images. -\section parameters PARAMETERS +\section dcmj2pnm_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be converted @@ -28,9 +28,9 @@ dcmfile-in DICOM input filename to be converted bitmap-out output filename to be written (default: stdout) \endverbatim -\section options OPTIONS +\section dcmj2pnm_options OPTIONS -\subsection general_options general options +\subsection dcmj2pnm_general_options general options \verbatim -h --help print this help text and exit @@ -58,7 +58,7 @@ bitmap-out output filename to be written (default: stdout) use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmj2pnm_input_options input options \verbatim input file format: @@ -89,7 +89,7 @@ input transfer syntax: read with implicit VR little endian TS \endverbatim -\subsection image_processing_options image processing options +\subsection dcmj2pnm_image_processing_options image processing options \verbatim frame selection: @@ -374,7 +374,7 @@ other transformations: clip image region (l, t, w, h) \endverbatim -\subsection output_options output options +\subsection dcmj2pnm_output_options output options \verbatim general: @@ -431,7 +431,7 @@ image format: write 8-bit lossy JPEG (baseline) \endverbatim -\section notes NOTES +\section dcmj2pnm_notes NOTES The following preferred interpolation algorithms can be selected using the \e --interpolate option: @@ -452,7 +452,7 @@ and compiled with support for the external \b libpng PNG library. Option \e --interlace enables progressive image view while loading the PNG file. Only a few applications take care of the meta info (TEXT) in a PNG file. -\section transfer_syntaxes TRANSFER SYNTAXES +\section dcmj2pnm_transfer_syntaxes TRANSFER SYNTAXES \b dcmj2pnm supports the following transfer syntaxes for input (\e dcmfile-in): @@ -472,7 +472,7 @@ RLELosslessTransferSyntax 1.2.840.10008.1.2.5 (*) if compiled with zlib support enabled -\section logging LOGGING +\section dcmj2pnm_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -491,7 +491,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmj2pnm_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -513,7 +513,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmj2pnm_environment ENVIRONMENT The \b dcmj2pnm utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -529,18 +529,18 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section files FILES +\section dcmj2pnm_files FILES \/camera.lut - sample characteristics file of a camera \n\/monitor.lut - sample characteristics file of a monitor \n\/printer.lut - sample characteristics file of a printer \n\/scanner.lut - sample characteristics file of a scanner -\section see_also SEE ALSO +\section dcmj2pnm_see_also SEE ALSO dcm2pnm(1), img2dcm(1) -\section copyright COPYRIGHT +\section dcmj2pnm_copyright COPYRIGHT Copyright (C) 2001-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmjpeg/docs/dcmmkdir.man b/dcmjpeg/docs/dcmmkdir.man index 0109ba23..fce3a138 100644 --- a/dcmjpeg/docs/dcmmkdir.man +++ b/dcmjpeg/docs/dcmmkdir.man @@ -6,13 +6,13 @@ \page dcmmkdir dcmmkdir: Create a DICOMDIR file \endif -\section synopsis SYNOPSIS +\section dcmmkdir_synopsis SYNOPSIS \verbatim dcmmkdir [options] [dcmfile-in...] \endverbatim -\section description DESCRIPTION +\section dcmmkdir_description DESCRIPTION The \b dcmmkdir utility creates a \e DICOMDIR file from the specified referenced DICOM files according to the DICOM Part 11 Media Storage Application @@ -64,14 +64,14 @@ This tool extends \b dcmgpdir which can only create General Purpose \e DICOMDIR files. The default behavior of \b dcmmkdir (with \e --general-purpose) is equivalent to that of \b dcmgpdir. -\section parameters PARAMETERS +\section dcmmkdir_parameters PARAMETERS \verbatim dcmfile-in referenced DICOM file (or directory to be scanned) \endverbatim -\section options OPTIONS -\subsection general_options general options +\section dcmmkdir_options OPTIONS +\subsection dcmmkdir_general_options general options \verbatim -h --help print this help text and exit @@ -99,7 +99,7 @@ dcmfile-in referenced DICOM file (or directory to be scanned) use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmmkdir_input_options input options \verbatim DICOMDIR identifiers: @@ -140,7 +140,7 @@ reading: # possibly not available on all systems \endverbatim -\subsection processing_options processing options +\subsection dcmmkdir_processing_options processing options \verbatim consistency check: @@ -203,7 +203,7 @@ icon images: created automatically (default: black image) \endverbatim -\subsection output_options output options +\subsection dcmmkdir_output_options output options \verbatim DICOMDIR file: @@ -373,7 +373,7 @@ length encoding in sequences and items: write with undefined lengths \endverbatim -\section notes NOTES +\section dcmmkdir_notes NOTES All files specified on the command line (or discovered by recursively examining the contents of directories with the \e +r option) are first evaluated for @@ -400,7 +400,7 @@ This might change in the future. Till then, color images are automatically converted to grayscale mode. The icon size is 128*128 pixels for the cardiac profiles (as required by the DICOM standard) and 64*64 for all others. -\subsection scanning_directories Scanning Directories +\subsection dcmmkdir_scanning_directories Scanning Directories Adding files from directories is possible by using option \e --recurse. If no further command line parameters are given, the directory specified by option @@ -414,7 +414,7 @@ other patterns are specified on the command line outside the \e --input-directory option (e.g. in order to select further files), these do not apply to the specified directories. -\section logging LOGGING +\section dcmmkdir_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -433,7 +433,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmmkdir_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -455,7 +455,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmmkdir_environment ENVIRONMENT The \b dcmmkdir utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -471,11 +471,11 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section see_also SEE ALSO +\section dcmmkdir_see_also SEE ALSO dcmgpdir(1) -\section copyright COPYRIGHT +\section dcmmkdir_copyright COPYRIGHT Copyright (C) 2001-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmjpeg/include/CMakeLists.txt b/dcmjpeg/include/CMakeLists.txt index e1c6aa4d..1a8c028d 100644 --- a/dcmjpeg/include/CMakeLists.txt +++ b/dcmjpeg/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmjpeg DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmjpeg DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djcodecd.h b/dcmjpeg/include/dcmtk/dcmjpeg/djcodecd.h index 99b6e481..4a747ce9 100644 --- a/dcmjpeg/include/dcmtk/dcmjpeg/djcodecd.h +++ b/dcmjpeg/include/dcmtk/dcmjpeg/djcodecd.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2011, OFFIS e.V. + * Copyright (C) 2001-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -188,6 +188,12 @@ public: */ virtual E_TransferSyntax supportedTransferSyntax() const = 0; + /** returns true if the transfer syntax supported by this + * codec is lossless. + * @return lossless flag + */ + virtual OFBool isLosslessProcess() const = 0; + private: /** creates an instance of the compression library to be used for decoding. diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djdecbas.h b/dcmjpeg/include/dcmtk/dcmjpeg/djdecbas.h index 549839f7..3809f6aa 100644 --- a/dcmjpeg/include/dcmtk/dcmjpeg/djdecbas.h +++ b/dcmjpeg/include/dcmtk/dcmjpeg/djdecbas.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2011, OFFIS e.V. + * Copyright (C) 1997-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -43,6 +43,12 @@ public: */ virtual E_TransferSyntax supportedTransferSyntax() const; + /** returns true if the transfer syntax supported by this + * codec is lossless. + * @return lossless flag + */ + virtual OFBool isLosslessProcess() const; + private: /** creates an instance of the compression library to be used for decoding. diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djdecext.h b/dcmjpeg/include/dcmtk/dcmjpeg/djdecext.h index a53b911e..8d48e1ac 100644 --- a/dcmjpeg/include/dcmtk/dcmjpeg/djdecext.h +++ b/dcmjpeg/include/dcmtk/dcmjpeg/djdecext.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2011, OFFIS e.V. + * Copyright (C) 1997-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -44,6 +44,12 @@ public: */ virtual E_TransferSyntax supportedTransferSyntax() const; + /** returns true if the transfer syntax supported by this + * codec is lossless. + * @return lossless flag + */ + virtual OFBool isLosslessProcess() const; + private: /** creates an instance of the compression library to be used for decoding. diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djdeclol.h b/dcmjpeg/include/dcmtk/dcmjpeg/djdeclol.h index 220aea04..780c4cd8 100644 --- a/dcmjpeg/include/dcmtk/dcmjpeg/djdeclol.h +++ b/dcmjpeg/include/dcmtk/dcmjpeg/djdeclol.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2011, OFFIS e.V. + * Copyright (C) 1997-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -44,6 +44,12 @@ public: */ virtual E_TransferSyntax supportedTransferSyntax() const; + /** returns true if the transfer syntax supported by this + * codec is lossless. + * @return lossless flag + */ + virtual OFBool isLosslessProcess() const; + private: /** creates an instance of the compression library to be used for decoding. diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djdecpro.h b/dcmjpeg/include/dcmtk/dcmjpeg/djdecpro.h index 464251fa..f4cfdf49 100644 --- a/dcmjpeg/include/dcmtk/dcmjpeg/djdecpro.h +++ b/dcmjpeg/include/dcmtk/dcmjpeg/djdecpro.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2011, OFFIS e.V. + * Copyright (C) 1997-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -44,6 +44,12 @@ public: */ virtual E_TransferSyntax supportedTransferSyntax() const; + /** returns true if the transfer syntax supported by this + * codec is lossless. + * @return lossless flag + */ + virtual OFBool isLosslessProcess() const; + private: /** creates an instance of the compression library to be used for decoding. diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djdecsps.h b/dcmjpeg/include/dcmtk/dcmjpeg/djdecsps.h index 6d7f25da..22b51282 100644 --- a/dcmjpeg/include/dcmtk/dcmjpeg/djdecsps.h +++ b/dcmjpeg/include/dcmtk/dcmjpeg/djdecsps.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2011, OFFIS e.V. + * Copyright (C) 1997-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -44,6 +44,12 @@ public: */ virtual E_TransferSyntax supportedTransferSyntax() const; + /** returns true if the transfer syntax supported by this + * codec is lossless. + * @return lossless flag + */ + virtual OFBool isLosslessProcess() const; + private: /** creates an instance of the compression library to be used for decoding. diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djdecsv1.h b/dcmjpeg/include/dcmtk/dcmjpeg/djdecsv1.h index 5567bbb2..87dba511 100644 --- a/dcmjpeg/include/dcmtk/dcmjpeg/djdecsv1.h +++ b/dcmjpeg/include/dcmtk/dcmjpeg/djdecsv1.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2011, OFFIS e.V. + * Copyright (C) 1997-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -44,6 +44,12 @@ public: */ virtual E_TransferSyntax supportedTransferSyntax() const; + /** returns true if the transfer syntax supported by this + * codec is lossless. + * @return lossless flag + */ + virtual OFBool isLosslessProcess() const; + private: /** creates an instance of the compression library to be used for decoding. diff --git a/dcmjpeg/include/dcmtk/dcmjpeg/djutils.h b/dcmjpeg/include/dcmtk/dcmjpeg/djutils.h index 80f7a743..1275dd7b 100644 --- a/dcmjpeg/include/dcmtk/dcmjpeg/djutils.h +++ b/dcmjpeg/include/dcmtk/dcmjpeg/djutils.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2014, OFFIS e.V. + * Copyright (C) 1997-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -218,6 +218,16 @@ public: * @return photometric interpretation enum, EPI_Unknown if unknown string or attribute missing */ static EP_Interpretation getPhotometricInterpretation(DcmItem *item); + + /** adjusts the padding of a JPEG bitstream in the buffer that has odd length, + * such that the End of Image (EOI) marker ends on an even byte boundary. + * @param buffer pointer to buffer containing compressed JPEG bitstream + * @param bufSize number of bytes used for the JPEG bitstream (including pad byte) + */ + static void fixPadding( + Uint8 *buffer, + Uint32 bufSize); + }; #endif diff --git a/dcmjpeg/libijg12/jerror.c b/dcmjpeg/libijg12/jerror.c index 1b79aadc..da5c14db 100644 --- a/dcmjpeg/libijg12/jerror.c +++ b/dcmjpeg/libijg12/jerror.c @@ -25,6 +25,7 @@ #include "jerror12.h" #ifdef USE_WINDOWS_MESSAGEBOX +#define WIN32_LEAN_AND_MEAN #include #endif diff --git a/dcmjpeg/libijg16/jerror.c b/dcmjpeg/libijg16/jerror.c index 140d50d5..6b2f29df 100644 --- a/dcmjpeg/libijg16/jerror.c +++ b/dcmjpeg/libijg16/jerror.c @@ -25,6 +25,7 @@ #include "jerror16.h" #ifdef USE_WINDOWS_MESSAGEBOX +#define WIN32_LEAN_AND_MEAN #include #endif diff --git a/dcmjpeg/libijg8/jerror.c b/dcmjpeg/libijg8/jerror.c index 2850aab0..f6595eca 100644 --- a/dcmjpeg/libijg8/jerror.c +++ b/dcmjpeg/libijg8/jerror.c @@ -25,6 +25,7 @@ #include "jerror8.h" #ifdef USE_WINDOWS_MESSAGEBOX +#define WIN32_LEAN_AND_MEAN #include #endif diff --git a/dcmjpeg/libsrc/CMakeLists.txt b/dcmjpeg/libsrc/CMakeLists.txt index 08da1209..8321c681 100644 --- a/dcmjpeg/libsrc/CMakeLists.txt +++ b/dcmjpeg/libsrc/CMakeLists.txt @@ -1,5 +1,5 @@ # declare additional include directories -INCLUDE_DIRECTORIES(${dcmjpeg_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${dcmimage_SOURCE_DIR}/include ${dcmjpeg_SOURCE_DIR}/libijg8 ${dcmjpeg_SOURCE_DIR}/libijg12 ${dcmjpeg_SOURCE_DIR}/libijg16 ${ZLIB_INCDIR}) +INCLUDE_DIRECTORIES("${dcmjpeg_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" "${dcmimage_SOURCE_DIR}/include" "${dcmjpeg_SOURCE_DIR}/libijg8" "${dcmjpeg_SOURCE_DIR}/libijg12" "${dcmjpeg_SOURCE_DIR}/libijg16" ${ZLIB_INCDIR}) # create library from source files DCMTK_ADD_LIBRARY(dcmjpeg ddpiimpl dipijpeg djcodecd djcodece djcparam djdecbas djdecext djdeclol djdecode djdecpro djdecsps djdecsv1 djdijg12 djdijg8 djdijg16 djeijg12 djeijg8 djeijg16 djencbas djencext djenclol djencode djencpro djencsps djencsv1 djrplol djrploss djutils) diff --git a/dcmjpeg/libsrc/Makefile.dep b/dcmjpeg/libsrc/Makefile.dep index 6350cbaa..f94d7c87 100644 --- a/dcmjpeg/libsrc/Makefile.dep +++ b/dcmjpeg/libsrc/Makefile.dep @@ -21,6 +21,7 @@ ddpiimpl.o: ddpiimpl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -33,7 +34,7 @@ ddpiimpl.o: ddpiimpl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -108,7 +109,10 @@ dipijpeg.o: dipijpeg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -126,10 +130,10 @@ dipijpeg.o: dipijpeg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diimage.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -180,7 +184,10 @@ djcodecd.o: djcodecd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -198,9 +205,9 @@ djcodecd.o: djcodecd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -252,7 +259,10 @@ djcodece.o: djcodece.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -270,9 +280,9 @@ djcodece.o: djcodece.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -348,7 +358,10 @@ djcparam.o: djcparam.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -366,9 +379,9 @@ djcparam.o: djcparam.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -400,7 +413,10 @@ djdecbas.o: djdecbas.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -418,9 +434,9 @@ djdecbas.o: djdecbas.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -463,7 +479,10 @@ djdecext.o: djdecext.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -481,9 +500,9 @@ djdecext.o: djdecext.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -527,7 +546,10 @@ djdeclol.o: djdeclol.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -545,9 +567,9 @@ djdeclol.o: djdeclol.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -591,7 +613,10 @@ djdecode.o: djdecode.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -609,9 +634,9 @@ djdecode.o: djdecode.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \ ../include/dcmtk/dcmjpeg/djdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dccodec.h \ @@ -647,7 +672,10 @@ djdecpro.o: djdecpro.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -665,9 +693,9 @@ djdecpro.o: djdecpro.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -711,7 +739,10 @@ djdecsps.o: djdecsps.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -729,9 +760,9 @@ djdecsps.o: djdecsps.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -775,7 +806,10 @@ djdecsv1.o: djdecsv1.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -793,9 +827,9 @@ djdecsv1.o: djdecsv1.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -837,7 +871,10 @@ djdijg12.o: djdijg12.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -855,10 +892,10 @@ djdijg12.o: djdijg12.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmjpeg/djutils.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \ @@ -892,7 +929,10 @@ djdijg16.o: djdijg16.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -910,10 +950,10 @@ djdijg16.o: djdijg16.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmjpeg/djutils.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \ @@ -947,7 +987,10 @@ djdijg8.o: djdijg8.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -965,10 +1008,10 @@ djdijg8.o: djdijg8.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../include/dcmtk/dcmjpeg/djutils.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \ @@ -1004,7 +1047,10 @@ djeijg12.o: djeijg12.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1021,10 +1067,10 @@ djeijg12.o: djeijg12.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \ ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \ @@ -1061,7 +1107,10 @@ djeijg16.o: djeijg16.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1078,10 +1127,10 @@ djeijg16.o: djeijg16.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \ ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \ @@ -1118,7 +1167,10 @@ djeijg8.o: djeijg8.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1135,10 +1187,10 @@ djeijg8.o: djeijg8.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \ ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \ @@ -1175,7 +1227,10 @@ djencbas.o: djencbas.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1193,9 +1248,9 @@ djencbas.o: djencbas.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -1238,7 +1293,10 @@ djencext.o: djencext.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1256,9 +1314,9 @@ djencext.o: djencext.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -1302,7 +1360,10 @@ djenclol.o: djenclol.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1320,9 +1381,9 @@ djenclol.o: djenclol.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -1366,7 +1427,10 @@ djencode.o: djencode.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1384,9 +1448,9 @@ djencode.o: djencode.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \ ../include/dcmtk/dcmjpeg/djdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -1422,7 +1486,10 @@ djencpro.o: djencpro.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1440,9 +1507,9 @@ djencpro.o: djencpro.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -1486,7 +1553,10 @@ djencsps.o: djencsps.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1504,9 +1574,9 @@ djencsps.o: djencsps.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -1550,7 +1620,10 @@ djencsv1.o: djencsv1.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1568,9 +1641,9 @@ djencsv1.o: djencsv1.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -1623,7 +1696,10 @@ djrplol.o: djrplol.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1640,9 +1716,9 @@ djrplol.o: djrplol.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -1680,7 +1756,10 @@ djrploss.o: djrploss.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1697,9 +1776,9 @@ djrploss.o: djrploss.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -1727,7 +1806,10 @@ djutils.o: djutils.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1745,9 +1827,9 @@ djutils.o: djutils.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \ ../include/dcmtk/dcmjpeg/djdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ diff --git a/dcmjpeg/libsrc/djcodecd.cc b/dcmjpeg/libsrc/djcodecd.cc index 125b96b6..754eb903 100644 --- a/dcmjpeg/libsrc/djcodecd.cc +++ b/dcmjpeg/libsrc/djcodecd.cc @@ -337,9 +337,14 @@ OFCondition DJCodecDecoder::decode( // which should always identify itself as dataset, not as item. if (dataset->ident() == EVR_dataset) { + DcmItem *ditem = OFreinterpret_cast(DcmItem*, dataset); + // create new SOP instance UID if codec parameters require so if (result.good() && (djcp->getUIDCreation() == EUC_always)) - result = DcmCodec::newInstance(OFreinterpret_cast(DcmItem*, dataset), NULL, NULL, NULL); + result = DcmCodec::newInstance(ditem, NULL, NULL, NULL); + + // set Lossy Image Compression to "01" (see DICOM part 3, C.7.6.1.1.5) + if (result.good() && (! isLosslessProcess())) result = ditem->putAndInsertString(DCM_LossyImageCompression, "01"); } } diff --git a/dcmjpeg/libsrc/djcodece.cc b/dcmjpeg/libsrc/djcodece.cc index d3d2d0cf..2bad1898 100644 --- a/dcmjpeg/libsrc/djcodece.cc +++ b/dcmjpeg/libsrc/djcodece.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2001-2016, OFFIS e.V. + * Copyright (C) 2001-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -248,7 +248,7 @@ OFCondition DJCodecEncoder::encodeColorImage( // initialize settings with defaults for RGB mode OFBool monochromeMode = OFFalse; - size_t flags = 0; // flags for initialization of DicomImage + unsigned long flags = 0; // flags for initialization of DicomImage EP_Interpretation interpr = EPI_RGB; Uint16 samplesPerPixel = 3; const char *photometricInterpretation = "RGB"; @@ -346,7 +346,7 @@ OFCondition DJCodecEncoder::encodeColorImage( // compute original image size in bytes, ignoring any padding bits. uncompressedSize = OFstatic_cast(double, columns * rows * dimage->getDepth() * frameCount * samplesPerPixel) / 8.0; - for (size_t i=0; (igetOutputData(bitsPerSample, i, 0); if (frame == NULL) result = EC_MemoryExhausted; @@ -884,7 +884,7 @@ OFCondition DJCodecEncoder::encodeMonochromeImage( compressionRatio = 0.0; // initialize if something goes wrong size_t compressedSize = 0; double uncompressedSize = 0.0; - size_t flags = 0; // flags for initialization of DicomImage + unsigned long flags = 0; // flags for initialization of DicomImage // variables needed if VOI mode is 0 double minRange = 0.0; @@ -999,14 +999,14 @@ OFCondition DJCodecEncoder::encodeMonochromeImage( { size_t windowParameter = cp->getWindowParameter(); if ((windowParameter < 1) || (windowParameter > dimage.getWindowCount())) result = EC_IllegalCall; - if (!dimage.setWindow(windowParameter - 1)) result = EC_IllegalCall; + if (!dimage.setWindow(OFstatic_cast(unsigned long, windowParameter - 1))) result = EC_IllegalCall; } break; case 2: // use the n-th VOI look up table from the image file { size_t windowParameter = cp->getWindowParameter(); if ((windowParameter < 1) || (windowParameter > dimage.getVoiLutCount())) result = EC_IllegalCall; - if (!dimage.setVoiLut(windowParameter - 1)) result = EC_IllegalCall; + if (!dimage.setVoiLut(OFstatic_cast(unsigned long, windowParameter - 1))) result = EC_IllegalCall; } break; case 3: // Compute VOI window using min-max algorithm @@ -1032,7 +1032,8 @@ OFCondition DJCodecEncoder::encodeMonochromeImage( { size_t left_pos=0, top_pos=0, width=0, height=0; cp->getROI(left_pos, top_pos, width, height); - if (!dimage.setRoiWindow(left_pos, top_pos, width, height)) result = EC_IllegalCall; + if (!dimage.setRoiWindow(OFstatic_cast(unsigned long, left_pos), OFstatic_cast(unsigned long, top_pos), + OFstatic_cast(unsigned long, width), OFstatic_cast(unsigned long, height))) result = EC_IllegalCall; } break; default: // includes case 0, which must not occur here @@ -1141,7 +1142,7 @@ OFCondition DJCodecEncoder::encodeMonochromeImage( uncompressedSize = OFstatic_cast(double, columns * rows * pixelDepth * frameCount * samplesPerPixel) / 8.0; for (size_t i=0; (iformat_message)(OFreinterpret_cast(jpeg_common_struct*, &cinfo), buffer); /* Create the message */ jpeg_destroy_compress(&cinfo); return makeOFCondition(OFM_dcmjpeg, EJCode_IJG12_Compression, OF_error, buffer); @@ -406,7 +406,7 @@ OFCondition DJCompressIJG12Bit::encode( jpeg_simple_lossless(&cinfo,psv,pt); break; } - + cinfo.smoothing_factor = cparam->getSmoothingFactor(); // initialize sampling factors @@ -445,7 +445,7 @@ OFCondition DJCompressIJG12Bit::encode( JSAMPROW row_pointer[1]; jpeg_start_compress(&cinfo,TRUE); int row_stride = columns * samplesPerPixel; - while (cinfo.next_scanline < cinfo.image_height) + while (cinfo.next_scanline < cinfo.image_height) { // JSAMPLE is signed, typecast to avoid a warning row_pointer[0] = OFreinterpret_cast(JSAMPLE*, image_buffer + (cinfo.next_scanline * row_stride)); @@ -456,11 +456,11 @@ OFCondition DJCompressIJG12Bit::encode( length = OFstatic_cast(Uint32, bytesInLastBlock); if (pixelDataList.size() > 1) length += OFstatic_cast(Uint32, (pixelDataList.size() - 1)*IJGE12_BLOCKSIZE); - if (length % 2) length++; // ensure even length + OFBool length_is_odd = (length % 2) > 0; + if (length_is_odd) length++; // ensure even length to = new Uint8[length]; if (to == NULL) return EC_MemoryExhausted; - if (length > 0) to[length-1] = 0; size_t offset=0; OFListIterator(unsigned char *) first = pixelDataList.begin(); @@ -481,6 +481,7 @@ OFCondition DJCompressIJG12Bit::encode( } ++first; } + if (length_is_odd) DcmJpegHelper::fixPadding(to, length); cleanup(); return EC_Normal; @@ -495,12 +496,12 @@ void DJCompressIJG12Bit::initDestination(jpeg_compress_struct *cinfo) { pixelDataList.push_back(newBlock); cinfo->dest->next_output_byte = newBlock; - cinfo->dest->free_in_buffer = IJGE12_BLOCKSIZE; + cinfo->dest->free_in_buffer = IJGE12_BLOCKSIZE; } else { cinfo->dest->next_output_byte = NULL; - cinfo->dest->free_in_buffer = 0; + cinfo->dest->free_in_buffer = 0; } } @@ -512,7 +513,7 @@ int DJCompressIJG12Bit::emptyOutputBuffer(jpeg_compress_struct *cinfo) { pixelDataList.push_back(newBlock); cinfo->dest->next_output_byte = newBlock; - cinfo->dest->free_in_buffer = IJGE12_BLOCKSIZE; + cinfo->dest->free_in_buffer = IJGE12_BLOCKSIZE; } else { diff --git a/dcmjpeg/libsrc/djeijg16.cc b/dcmjpeg/libsrc/djeijg16.cc index e045cd0f..c490e160 100644 --- a/dcmjpeg/libsrc/djeijg16.cc +++ b/dcmjpeg/libsrc/djeijg16.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2014, OFFIS e.V. + * Copyright (C) 1997-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -15,7 +15,7 @@ * * Author: Marco Eichelberg, Norbert Olges * - * Purpose: compression routines of the IJG JPEG library configured for 16 bits/sample. + * Purpose: compression routines of the IJG JPEG library configured for 16 bits/sample. * */ @@ -181,7 +181,7 @@ OFCondition DJCompressIJG16Bit::encode( return EC_IllegalCall; } -OFCondition DJCompressIJG16Bit::encode( +OFCondition DJCompressIJG16Bit::encode( Uint16 columns, Uint16 rows, EP_Interpretation colorSpace, @@ -200,7 +200,7 @@ OFCondition DJCompressIJG16Bit::encode( if (setjmp(jerr.setjmp_buffer)) { // the IJG error handler will cause the following code to be executed - char buffer[JMSG_LENGTH_MAX]; + char buffer[JMSG_LENGTH_MAX]; (*cinfo.err->format_message)(OFreinterpret_cast(jpeg_common_struct*, &cinfo), buffer); /* Create the message */ jpeg_destroy_compress(&cinfo); return makeOFCondition(OFM_dcmjpeg, EJCode_IJG16_Compression, OF_error, buffer); @@ -242,7 +242,7 @@ OFCondition DJCompressIJG16Bit::encode( return makeOFCondition(OFM_dcmjpeg, EJCode_IJG16_Compression, OF_error, "JPEG with 16 bits/sample only allowed with lossless compression"); /* break; */ } - + cinfo.smoothing_factor = cparam->getSmoothingFactor(); // initialize sampling factors @@ -281,7 +281,7 @@ OFCondition DJCompressIJG16Bit::encode( JSAMPROW row_pointer[1]; jpeg_start_compress(&cinfo,TRUE); int row_stride = columns * samplesPerPixel; - while (cinfo.next_scanline < cinfo.image_height) + while (cinfo.next_scanline < cinfo.image_height) { // JSAMPLE might be signed, typecast to avoid a warning row_pointer[0] = OFreinterpret_cast(JSAMPLE*, image_buffer + (cinfo.next_scanline * row_stride)); @@ -292,11 +292,11 @@ OFCondition DJCompressIJG16Bit::encode( length = OFstatic_cast(Uint32, bytesInLastBlock); if (pixelDataList.size() > 1) length += OFstatic_cast(Uint32, (pixelDataList.size() - 1)*IJGE16_BLOCKSIZE); - if (length % 2) length++; // ensure even length + OFBool length_is_odd = (length % 2) > 0; + if (length_is_odd) length++; // ensure even length to = new Uint8[length]; if (to == NULL) return EC_MemoryExhausted; - if (length > 0) to[length-1] = 0; size_t offset=0; OFListIterator(unsigned char *) first = pixelDataList.begin(); @@ -317,6 +317,7 @@ OFCondition DJCompressIJG16Bit::encode( } ++first; } + if (length_is_odd) DcmJpegHelper::fixPadding(to, length); cleanup(); return EC_Normal; @@ -331,12 +332,12 @@ void DJCompressIJG16Bit::initDestination(jpeg_compress_struct *cinfo) { pixelDataList.push_back(newBlock); cinfo->dest->next_output_byte = newBlock; - cinfo->dest->free_in_buffer = IJGE16_BLOCKSIZE; + cinfo->dest->free_in_buffer = IJGE16_BLOCKSIZE; } else { cinfo->dest->next_output_byte = NULL; - cinfo->dest->free_in_buffer = 0; + cinfo->dest->free_in_buffer = 0; } } @@ -348,12 +349,12 @@ int DJCompressIJG16Bit::emptyOutputBuffer(jpeg_compress_struct *cinfo) { pixelDataList.push_back(newBlock); cinfo->dest->next_output_byte = newBlock; - cinfo->dest->free_in_buffer = IJGE16_BLOCKSIZE; + cinfo->dest->free_in_buffer = IJGE16_BLOCKSIZE; } else { cinfo->dest->next_output_byte = NULL; - cinfo->dest->free_in_buffer = 0; + cinfo->dest->free_in_buffer = 0; OF_ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 0xFF); } return TRUE; diff --git a/dcmjpeg/libsrc/djeijg8.cc b/dcmjpeg/libsrc/djeijg8.cc index d61458ca..28890c1e 100644 --- a/dcmjpeg/libsrc/djeijg8.cc +++ b/dcmjpeg/libsrc/djeijg8.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2014, OFFIS e.V. + * Copyright (C) 1997-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -15,7 +15,7 @@ * * Author: Marco Eichelberg, Norbert Olges * - * Purpose: compression routines of the IJG JPEG library configured for 8 bits/sample. + * Purpose: compression routines of the IJG JPEG library configured for 8 bits/sample. * */ @@ -183,7 +183,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo) scanptr[0].Se = 0; scanptr[0].Ah = 0; scanptr[0].Al = 0; - + // AC scans // First two Y AC coefficients scanptr[1].component_index[0] = 0; @@ -192,7 +192,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo) scanptr[1].Se = 2; scanptr[1].Ah = 0; scanptr[1].Al = 0; - + // Three more scanptr[2].component_index[0] = 0; scanptr[2].comps_in_scan = 1; @@ -200,7 +200,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo) scanptr[2].Se = 5; scanptr[2].Ah = 0; scanptr[2].Al = 0; - + // All AC coefficients for Cb scanptr[3].component_index[0] = 1; scanptr[3].comps_in_scan = 1; @@ -208,7 +208,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo) scanptr[3].Se = 63; scanptr[3].Ah = 0; scanptr[3].Al = 0; - + // All AC coefficients for Cr scanptr[4].component_index[0] = 2; scanptr[4].comps_in_scan = 1; @@ -216,7 +216,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo) scanptr[4].Se = 63; scanptr[4].Ah = 0; scanptr[4].Al = 0; - + // More Y coefficients scanptr[5].component_index[0] = 0; scanptr[5].comps_in_scan = 1; @@ -224,7 +224,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo) scanptr[5].Se = 9; scanptr[5].Ah = 0; scanptr[5].Al = 0; - + // Remaining Y coefficients scanptr[6].component_index[0] = 0; scanptr[6].comps_in_scan = 1; @@ -237,7 +237,7 @@ static void jpeg_simple_spectral_selection(j_compress_ptr cinfo) { /* All-purpose script for other color spaces. */ int j=0; - + // Interleaved DC scan for all components for (j=0; jformat_message)(OFreinterpret_cast(jpeg_common_struct*, &cinfo), buffer); /* Create the message */ jpeg_destroy_compress(&cinfo); return makeOFCondition(OFM_dcmjpeg, EJCode_IJG8_Compression, OF_error, buffer); @@ -410,7 +410,7 @@ OFCondition DJCompressIJG8Bit::encode( jpeg_simple_lossless(&cinfo,psv,pt); break; } - + cinfo.smoothing_factor = cparam->getSmoothingFactor(); // initialize sampling factors @@ -449,7 +449,7 @@ OFCondition DJCompressIJG8Bit::encode( JSAMPROW row_pointer[1]; jpeg_start_compress(&cinfo,TRUE); int row_stride = columns * samplesPerPixel; - while (cinfo.next_scanline < cinfo.image_height) + while (cinfo.next_scanline < cinfo.image_height) { row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride]; jpeg_write_scanlines(&cinfo, row_pointer, 1); @@ -459,11 +459,11 @@ OFCondition DJCompressIJG8Bit::encode( length = OFstatic_cast(Uint32, bytesInLastBlock); if (pixelDataList.size() > 1) length += OFstatic_cast(Uint32, (pixelDataList.size() - 1)*IJGE8_BLOCKSIZE); - if (length % 2) length++; // ensure even length + OFBool length_is_odd = (length % 2) > 0; + if (length_is_odd) length++; // ensure even length to = new Uint8[length]; if (to == NULL) return EC_MemoryExhausted; - if (length > 0) to[length-1] = 0; size_t offset=0; OFListIterator(unsigned char *) first = pixelDataList.begin(); @@ -484,6 +484,7 @@ OFCondition DJCompressIJG8Bit::encode( } ++first; } + if (length_is_odd) DcmJpegHelper::fixPadding(to, length); cleanup(); return EC_Normal; } @@ -497,12 +498,12 @@ void DJCompressIJG8Bit::initDestination(jpeg_compress_struct *cinfo) { pixelDataList.push_back(newBlock); cinfo->dest->next_output_byte = newBlock; - cinfo->dest->free_in_buffer = IJGE8_BLOCKSIZE; + cinfo->dest->free_in_buffer = IJGE8_BLOCKSIZE; } else { cinfo->dest->next_output_byte = NULL; - cinfo->dest->free_in_buffer = 0; + cinfo->dest->free_in_buffer = 0; } } @@ -514,7 +515,7 @@ int DJCompressIJG8Bit::emptyOutputBuffer(jpeg_compress_struct *cinfo) { pixelDataList.push_back(newBlock); cinfo->dest->next_output_byte = newBlock; - cinfo->dest->free_in_buffer = IJGE8_BLOCKSIZE; + cinfo->dest->free_in_buffer = IJGE8_BLOCKSIZE; } else { diff --git a/dcmjpeg/libsrc/djutils.cc b/dcmjpeg/libsrc/djutils.cc index 893a510f..f2cc7a10 100644 --- a/dcmjpeg/libsrc/djutils.cc +++ b/dcmjpeg/libsrc/djutils.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1997-2014, OFFIS e.V. + * Copyright (C) 1997-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -68,3 +68,29 @@ EP_Interpretation DcmJpegHelper::getPhotometricInterpretation(DcmItem *item) } return EPI_Unknown; } + +void DcmJpegHelper::fixPadding( + Uint8 *buffer, + Uint32 bufSize) +{ + if (buffer && (bufSize > 0)) + { + // first write a zero pad byte after the end of the JPEG bitstream + buffer[bufSize - 1] = 0; + +#ifndef DISABLE_FF_JPEG_BITSTREAM_PADDING + // look for the EOI marker + if ((bufSize > 2) && (buffer[bufSize-3] == 0xFF) && (buffer[bufSize-2] == 0xD9)) + { + // we now have ff/d9/00 at the end of the JPEG bitstream, + // i.e. an end of image (EOI) marker followed by a pad byte. + // Replace this with ff/ff/d9, which is an "extended" EOI marker + // ending on an even byte boundary. + buffer[bufSize-2] = 0xFF; + buffer[bufSize-1] = 0xD9; + } + } +#endif + + return; +} diff --git a/dcmjpls/apps/CMakeLists.txt b/dcmjpls/apps/CMakeLists.txt index 2e881d72..14d87569 100644 --- a/dcmjpls/apps/CMakeLists.txt +++ b/dcmjpls/apps/CMakeLists.txt @@ -1,5 +1,5 @@ # declare additional include directories -INCLUDE_DIRECTORIES(${dcmjpls_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${dcmimage_SOURCE_DIR}/include ${ZLIB_INCDIR} ${LIBTIFF_INCDIR} ${LIBPNG_INCDIR}) +INCLUDE_DIRECTORIES("${dcmjpls_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" "${dcmimage_SOURCE_DIR}/include" ${ZLIB_INCDIR} ${LIBTIFF_INCDIR} ${LIBPNG_INCDIR}) # declare executables FOREACH(PROGRAM dcmcjpls dcmdjpls dcml2pnm) diff --git a/dcmjpls/apps/Makefile.dep b/dcmjpls/apps/Makefile.dep index 28bdffb6..0cb3878b 100644 --- a/dcmjpls/apps/Makefile.dep +++ b/dcmjpls/apps/Makefile.dep @@ -19,7 +19,10 @@ dcmcjpls.o: dcmcjpls.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -37,10 +40,10 @@ dcmcjpls.o: dcmcjpls.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -68,8 +71,6 @@ dcmcjpls.o: dcmcjpls.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -141,7 +142,10 @@ dcmdjpls.o: dcmdjpls.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -159,10 +163,10 @@ dcmdjpls.o: dcmdjpls.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -190,8 +194,6 @@ dcmdjpls.o: dcmdjpls.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -262,7 +264,10 @@ dcml2pnm.o: dcml2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -280,10 +285,10 @@ dcml2pnm.o: dcml2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -311,8 +316,6 @@ dcml2pnm.o: dcml2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ diff --git a/dcmjpls/apps/Makefile.in b/dcmjpls/apps/Makefile.in index 5d86402d..33ef2597 100644 --- a/dcmjpls/apps/Makefile.in +++ b/dcmjpls/apps/Makefile.in @@ -50,21 +50,22 @@ LOCALINCLUDES = $(dcmjplsinc) $(ofstdinc) $(ofloginc) $(dcmdatainc) $(dcmimagein LIBDIRS = -L$(top_srcdir)/libsrc $(dcmjplslibdir) $(libcharlslibdir) $(dcmimagelibdir) \ $(dcmimglelibdir) $(dcmdatalibdir) $(ofloglibdir) $(ofstdlibdir) LOCALLIBS = $(dcmjplslib) $(dcmimagelib) $(dcmimglelib) $(dcmdatalib) $(ofloglib) $(ofstdlib) \ - $(libcharlslib) $(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) + $(libcharlslib) $(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS) objs = dcmdjpls.o dcmcjpls.o dcml2pnm.o progs = dcmdjpls dcmcjpls dcml2pnm + all: $(progs) dcmdjpls: dcmdjpls.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcmcjpls: dcmcjpls.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcml2pnm: dcml2pnm.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) install: all diff --git a/dcmjpls/apps/dcmcjpls.cc b/dcmjpls/apps/dcmcjpls.cc index 9d48be34..ebe44a5d 100644 --- a/dcmjpls/apps/dcmcjpls.cc +++ b/dcmjpls/apps/dcmcjpls.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2014, OFFIS e.V. + * Copyright (C) 2007-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,10 +26,6 @@ #define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" @@ -65,11 +61,6 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" int main(int argc, char *argv[]) { -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - const char *opt_ifname = NULL; const char *opt_ofname = NULL; diff --git a/dcmjpls/apps/dcmdjpls.cc b/dcmjpls/apps/dcmdjpls.cc index e50fdc7e..5bb88421 100644 --- a/dcmjpls/apps/dcmdjpls.cc +++ b/dcmjpls/apps/dcmdjpls.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2014, OFFIS e.V. + * Copyright (C) 2007-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -26,10 +26,6 @@ #define INCLUDE_CSTRING #include "dcmtk/ofstd/ofstdinc.h" -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/dcmdata/dctk.h" #include "dcmtk/dcmdata/cmdlnarg.h" #include "dcmtk/ofstd/ofconapp.h" @@ -63,12 +59,6 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" int main(int argc, char *argv[]) { - -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - const char *opt_ifname = NULL; const char *opt_ofname = NULL; diff --git a/dcmjpls/docs/dcmcjpls.man b/dcmjpls/docs/dcmcjpls.man index be5fe13f..0ce5ca0b 100644 --- a/dcmjpls/docs/dcmcjpls.man +++ b/dcmjpls/docs/dcmcjpls.man @@ -6,20 +6,20 @@ \page dcmcjpls dcmcjpls: Encode DICOM file to JPEG-LS transfer syntax \endif -\section synopsis SYNOPSIS +\section dcmcjpls_synopsis SYNOPSIS \verbatim dcmcjpls [options] dcmfile-in dcmfile-out \endverbatim -\section description DESCRIPTION +\section dcmcjpls_description DESCRIPTION The \b dcmcjpls utility reads an uncompressed DICOM image (\e dcmfile-in), performs a JPEG-LS compression (i. e. conversion to an encapsulated DICOM transfer syntax) and writes the converted image to an output file (\e dcmfile-out). -\section parameters PARAMETERS +\section dcmcjpls_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be converted @@ -27,9 +27,9 @@ dcmfile-in DICOM input filename to be converted dcmfile-out DICOM output filename \endverbatim -\section options OPTIONS +\section dcmcjpls_options OPTIONS -\subsection general_options general options +\subsection dcmcjpls_general_options general options \verbatim -h --help print this help text and exit @@ -57,7 +57,7 @@ dcmfile-out DICOM output filename use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmcjpls_input_options input options \verbatim input file format: @@ -88,7 +88,7 @@ input transfer syntax: read with implicit VR little endian TS \endverbatim -\subsection JPEG_LS_encoding_options JPEG-LS encoding options +\subsection dcmcjpls_JPEG_LS_encoding_options JPEG-LS encoding options \verbatim JPEG-LS process: @@ -176,7 +176,7 @@ JPEG-LS interleave: # If possible, the image is not converted to a different interleave mode. \endverbatim -\subsection enc_pix_data_encoding_opt encapsulated pixel data encoding options +\subsection dcmcjpls_enc_pix_data_encoding_opt encapsulated pixel data encoding options \verbatim encapsulated pixel data fragmentation: @@ -238,7 +238,7 @@ SOP Instance UID: # Never assigns a new SOP instance UID. \endverbatim -\subsection output_options output options +\subsection dcmcjpls_output_options output options \verbatim post-1993 value representations: @@ -280,7 +280,7 @@ data set trailing padding: and items on multiple of i bytes \endverbatim -\section notes NOTES +\section dcmcjpls_notes NOTES The \b dcmcjpls utility compresses DICOM images of all SOP classes. However, \b dcmcjpls does not attempt to ensure that the compressed image still @@ -291,7 +291,7 @@ are compliant with the DICOM standard. If in question, the \b dcmcjpls utility allows one to convert an image to secondary capture - this SOP class does not pose restrictions as the ones mentioned above. -\section transfer_syntaxes TRANSFER SYNTAXES +\section dcmcjpls_transfer_syntaxes TRANSFER SYNTAXES \b dcmcjpls supports the following transfer syntaxes for input (\e dcmfile-in): @@ -313,7 +313,7 @@ JPEGLSLosslessTransferSyntax 1.2.840.10008.1.2.4.80 JPEGLSLossyTransferSyntax 1.2.840.10008.1.2.4.81 \endverbatim -\section logging LOGGING +\section dcmcjpls_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -332,7 +332,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmcjpls_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -354,7 +354,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmcjpls_environment ENVIRONMENT The \b dcmcjpls utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -370,11 +370,11 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section see_also SEE ALSO +\section dcmcjpls_see_also SEE ALSO dcmdjpls(1) -\section copyright COPYRIGHT +\section dcmcjpls_copyright COPYRIGHT Copyright (C) 2009-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmjpls/docs/dcmdjpls.man b/dcmjpls/docs/dcmdjpls.man index 8003f0b4..86c45e71 100644 --- a/dcmjpls/docs/dcmdjpls.man +++ b/dcmjpls/docs/dcmdjpls.man @@ -6,19 +6,19 @@ \page dcmdjpls dcmdjpls: Decode JPEG-LS compressed DICOM file \endif -\section synopsis SYNOPSIS +\section dcmdjpls_synopsis SYNOPSIS \verbatim dcmdjpls [options] dcmfile-in dcmfile-out \endverbatim -\section description DESCRIPTION +\section dcmdjpls_description DESCRIPTION The \b dcmdjpls utility reads a JPEG-ls compressed DICOM image (\e dcmfile-in), decompresses the JPEG-LS data (i. e. conversion to a native DICOM transfer syntax) and writes the converted image to an output file (\e dcmfile-out). -\section parameters PARAMETERS +\section dcmdjpls_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be converted @@ -26,9 +26,9 @@ dcmfile-in DICOM input filename to be converted dcmfile-out DICOM output filename \endverbatim -\section options OPTIONS +\section dcmdjpls_options OPTIONS -\subsection general_options general options +\subsection dcmdjpls_general_options general options \verbatim -h --help print this help text and exit @@ -56,7 +56,7 @@ dcmfile-out DICOM output filename use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcmdjpls_input_options input options \verbatim input file format: @@ -75,7 +75,7 @@ input file format: # but unfortunately it does. \endverbatim -\subsection processing_options processing options +\subsection dcmdjpls_processing_options processing options \verbatim planar configuration: @@ -126,7 +126,7 @@ other processing options: ignore offset table when decompressing \endverbatim -\subsection output_options output options +\subsection dcmdjpls_output_options output options \verbatim output file format: @@ -187,7 +187,7 @@ data set trailing padding (not with --write-dataset): and items on multiple of i bytes \endverbatim -\section transfer_syntaxes TRANSFER SYNTAXES +\section dcmdjpls_transfer_syntaxes TRANSFER SYNTAXES \b dcmdjpls supports the following transfer syntaxes for input (\e dcmfile-in): @@ -212,7 +212,7 @@ LittleEndianExplicitTransferSyntax 1.2.840.10008.1.2.1 BigEndianExplicitTransferSyntax 1.2.840.10008.1.2.2 \endverbatim -\section logging LOGGING +\section dcmdjpls_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -231,7 +231,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcmdjpls_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -253,7 +253,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcmdjpls_environment ENVIRONMENT The \b dcmdjpls utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -269,11 +269,11 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section see_also SEE ALSO +\section dcmdjpls_see_also SEE ALSO dcmcjpls(1) -\section copyright COPYRIGHT +\section dcmdjpls_copyright COPYRIGHT Copyright (C) 2009-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmjpls/docs/dcml2pnm.man b/dcmjpls/docs/dcml2pnm.man index 58718ecf..a5044f4e 100644 --- a/dcmjpls/docs/dcml2pnm.man +++ b/dcmjpls/docs/dcml2pnm.man @@ -6,13 +6,13 @@ \page dcml2pnm dcml2pnm: Convert DICOM images to PGM/PPM, PNG, TIFF or BMP \endif -\section synopsis SYNOPSIS +\section dcml2pnm_synopsis SYNOPSIS \verbatim dcml2pnm [options] dcmfile-in [bitmap-out] \endverbatim -\section description DESCRIPTION +\section dcml2pnm_description DESCRIPTION The \b dcml2pnm utility reads a DICOM image, converts the pixel data according to the selected image processing options and writes back an image in the @@ -20,7 +20,7 @@ well-known PGM/PPM (portable gray map / portable pix map), PNG, TIFF or Windows BMP format. This utility supports uncompressed as well as JPEG-LS and RLE compressed DICOM images. -\section parameters PARAMETERS +\section dcml2pnm_parameters PARAMETERS \verbatim dcmfile-in DICOM input filename to be converted @@ -28,9 +28,9 @@ dcmfile-in DICOM input filename to be converted bitmap-out output filename to be written (default: stdout) \endverbatim -\section options OPTIONS +\section dcml2pnm_options OPTIONS -\subsection general_options general options +\subsection dcml2pnm_general_options general options \verbatim -h --help print this help text and exit @@ -58,7 +58,7 @@ bitmap-out output filename to be written (default: stdout) use config file f for the logger \endverbatim -\subsection input_options input options +\subsection dcml2pnm_input_options input options \verbatim input file format: @@ -89,7 +89,7 @@ input transfer syntax: read with implicit VR little endian TS \endverbatim -\subsection image_processing_options image processing options +\subsection dcml2pnm_image_processing_options image processing options \verbatim frame selection: @@ -337,7 +337,7 @@ other transformations: clip image region (l, t, w, h) \endverbatim -\subsection output_options output options +\subsection dcml2pnm_output_options output options \verbatim general: @@ -391,7 +391,7 @@ image format: write 16-bit (monochrome) or 48-bit (color) PNG \endverbatim -\section notes NOTES +\section dcml2pnm_notes NOTES The following preferred interpolation algorithms can be selected using the \e --interpolate option: @@ -412,7 +412,7 @@ and compiled with support for the external \b libpng PNG library. Option \e --interlace enables progressive image view while loading the PNG file. Only a few applications take care of the meta info (TEXT) in a PNG file. -\section transfer_syntaxes TRANSFER SYNTAXES +\section dcml2pnm_transfer_syntaxes TRANSFER SYNTAXES \b dcml2pnm supports the following transfer syntaxes for input (\e dcmfile-in): @@ -428,7 +428,7 @@ RLELosslessTransferSyntax 1.2.840.10008.1.2.5 (*) if compiled with zlib support enabled -\section logging LOGGING +\section dcml2pnm_logging LOGGING The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings @@ -447,7 +447,7 @@ messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in \/logger.cfg. -\section command_line COMMAND LINE +\section dcml2pnm_command_line COMMAND LINE All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that @@ -469,7 +469,7 @@ allows one to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file \/dumppat.txt). -\section environment ENVIRONMENT +\section dcml2pnm_environment ENVIRONMENT The \b dcml2pnm utility will attempt to load DICOM data dictionaries specified in the \e DCMDICTPATH environment variable. By default, i.e. if the @@ -485,18 +485,18 @@ a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the \e DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. -\section files FILES +\section dcml2pnm_files FILES \/camera.lut - sample characteristics file of a camera \n\/monitor.lut - sample characteristics file of a monitor \n\/printer.lut - sample characteristics file of a printer \n\/scanner.lut - sample characteristics file of a scanner -\section see_also SEE ALSO +\section dcml2pnm_see_also SEE ALSO dcm2pnm(1), img2dcm(1) -\section copyright COPYRIGHT +\section dcml2pnm_copyright COPYRIGHT Copyright (C) 2001-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany. diff --git a/dcmjpls/include/CMakeLists.txt b/dcmjpls/include/CMakeLists.txt index 52033b01..a83fe385 100644 --- a/dcmjpls/include/CMakeLists.txt +++ b/dcmjpls/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmjpls DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmjpls DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmjpls/include/dcmtk/dcmjpls/djcodecd.h b/dcmjpls/include/dcmtk/dcmjpls/djcodecd.h index 062c0a75..71c5de79 100644 --- a/dcmjpls/include/dcmtk/dcmjpls/djcodecd.h +++ b/dcmjpls/include/dcmtk/dcmjpls/djcodecd.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2011, OFFIS e.V. + * Copyright (C) 2007-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -177,6 +177,12 @@ public: private: + /** returns the transfer syntax that this particular codec + * is able to Decode + * @return supported transfer syntax + */ + virtual E_TransferSyntax supportedTransferSyntax() const = 0; + // static private helper methods /** decompresses a single frame from the given pixel sequence and diff --git a/dcmjpls/include/dcmtk/dcmjpls/djcodece.h b/dcmjpls/include/dcmtk/dcmjpls/djcodece.h index f0b79b5a..09465627 100644 --- a/dcmjpls/include/dcmtk/dcmjpls/djcodece.h +++ b/dcmjpls/include/dcmtk/dcmjpls/djcodece.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2011, OFFIS e.V. + * Copyright (C) 2007-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -343,6 +343,18 @@ private: Uint32 width, Uint32 height, Uint16 bitsAllocated) const; + + /** Adjust the padding of the JPEG-LS bitstream in the buffer if it has odd length, + * such that the End of Image (EOI) marker ends on an even byte boundary. + * @param buffer pointer to buffer containing compressed JPEG-LS bitstream + * @param bufSize size of the buffer in bytes + * @param bytesWritten number of bytes written to buffer; value is increased + * if this method adds a pad byte. + */ + static void fixPaddingIfNecessary( + Uint8 *buffer, + size_t bufSize, + unsigned long &bytesWritten); }; diff --git a/dcmjpls/libcharls/CMakeLists.txt b/dcmjpls/libcharls/CMakeLists.txt index 99371f70..efd52ff5 100644 --- a/dcmjpls/libcharls/CMakeLists.txt +++ b/dcmjpls/libcharls/CMakeLists.txt @@ -1,5 +1,7 @@ # declare additional include directories -INCLUDE_DIRECTORIES(${dcmjpls_SOURCE_DIR}/libcharls ${ofstd_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES("${dcmjpls_SOURCE_DIR}/libcharls" "${ofstd_SOURCE_DIR}/include") # create library from source files DCMTK_ADD_LIBRARY(charls header intrface jpegls) + +DCMTK_TARGET_LINK_MODULES(charls ofstd oflog) diff --git a/dcmjpls/libcharls/Makefile.dep b/dcmjpls/libcharls/Makefile.dep index e9e67ba4..1f5dcd41 100644 --- a/dcmjpls/libcharls/Makefile.dep +++ b/dcmjpls/libcharls/Makefile.dep @@ -1,13 +1,16 @@ header.o: header.cc config.h util.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../config/include/dcmtk/config/osconfig.h pubtypes.h header.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h streams.h \ - ../../ofstd/include/dcmtk/ofstd/ofvector.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oftypes.h \ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \ ../../ofstd/include/dcmtk/ofstd/ofcast.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h streams.h \ + ../../ofstd/include/dcmtk/ofstd/ofvector.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h decodstr.h procline.h \ clrtrans.h encodstr.h intrface.o: intrface.cc config.h util.h \ @@ -24,8 +27,11 @@ intrface.o: intrface.cc config.h util.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h header.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h streams.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h header.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h streams.h \ ../../ofstd/include/dcmtk/ofstd/ofvector.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h jpegls.o: jpegls.cc config.h util.h \ @@ -38,10 +44,10 @@ jpegls.o: jpegls.cc config.h util.h \ ../../ofstd/include/dcmtk/ofstd/ofexport.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h header.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h decodstr.h procline.h \ - clrtrans.h encodstr.h context.h ctxtrmod.h lokuptbl.h lltraits.h \ - deftrait.h scan.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../ofstd/include/dcmtk/ofstd/ofutil.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h decodstr.h \ + procline.h clrtrans.h encodstr.h context.h ctxtrmod.h lokuptbl.h \ + lltraits.h deftrait.h scan.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h diff --git a/dcmjpls/libcharls/decodstr.h b/dcmjpls/libcharls/decodstr.h index d892c5ef..c01dbb71 100644 --- a/dcmjpls/libcharls/decodstr.h +++ b/dcmjpls/libcharls/decodstr.h @@ -19,7 +19,7 @@ class DecoderStrategy public: DecoderStrategy(const JlsParameters& info) : _info(info), - _processLine(0), + _processLine(OFnullptr), _readCache(0), _validBits(0), _position(0), @@ -274,7 +274,7 @@ public: protected: JlsParameters _info; - OFauto_ptr _processLine; + OFunique_ptr _processLine; private: BYTE current_value() const diff --git a/dcmjpls/libcharls/encodstr.h b/dcmjpls/libcharls/encodstr.h index 786754e4..7c49e8f0 100644 --- a/dcmjpls/libcharls/encodstr.h +++ b/dcmjpls/libcharls/encodstr.h @@ -8,7 +8,7 @@ #define INCLUDE_NEW #include "dcmtk/ofstd/ofstdinc.h" -#include "dcmtk/ofstd/ofaptr.h" +#include "dcmtk/ofstd/ofmem.h" #include "dcmtk/ofstd/ofbmanip.h" #include "procline.h" #include "decodstr.h" @@ -20,9 +20,9 @@ class EncoderStrategy public: explicit EncoderStrategy(const JlsParameters& info) : - _qdecoder(0), + _qdecoder(OFnullptr), _info(info), - _processLine(0), + _processLine(OFnullptr), valcurrent(0), bitpos(0), _isFFWritten(false), @@ -148,11 +148,11 @@ protected: } - OFauto_ptr _qdecoder; + OFunique_ptr _qdecoder; protected: JlsParameters _info; - OFauto_ptr _processLine; + OFunique_ptr _processLine; private: static BYTE *re_alloc(BYTE *old_ptr, size_t *old_size) { diff --git a/dcmjpls/libcharls/header.cc b/dcmjpls/libcharls/header.cc index f7c3dd17..8e9a0504 100644 --- a/dcmjpls/libcharls/header.cc +++ b/dcmjpls/libcharls/header.cc @@ -529,7 +529,7 @@ int JLSInputStream::ReadWord() void JLSInputStream::ReadScan(void* pvout) { - OFauto_ptr qcodec = JlsCodecFactory().GetCodec(_info, _info.custom); + OFunique_ptr qcodec = JlsCodecFactory().GetCodec(_info, _info.custom); BYTE **ptr = (BYTE **)&_pdata; size_t *size = &_cbyteLength; @@ -552,7 +552,7 @@ public: { JlsParameters info = _info; info.components = _ccompScan; - OFauto_ptr qcodec =JlsCodecFactory().GetCodec(info, _info.custom); + OFunique_ptr qcodec =JlsCodecFactory().GetCodec(info, _info.custom); size_t cbyteWritten = qcodec->EncodeScan((BYTE*)_pvoidRaw, pstream->get_pos(), pstream->get_size(), pstream->get_offset(), pstream->_bCompare); pstream->seek(cbyteWritten); } diff --git a/dcmjpls/libcharls/header.h b/dcmjpls/libcharls/header.h index d0fc0f8c..effb4f8b 100644 --- a/dcmjpls/libcharls/header.h +++ b/dcmjpls/libcharls/header.h @@ -6,7 +6,8 @@ #ifndef CHARLS_HEADER #define CHARLS_HEADER -#include "dcmtk/ofstd/ofaptr.h" +#include "dcmtk/ofstd/ofmem.h" +#undef NEAR #include "streams.h" #define JPEG_SOI 0xD8 @@ -39,7 +40,7 @@ template class JlsCodecFactory { public: - OFauto_ptr GetCodec(const JlsParameters& info, const JlsCustomParameters&); + OFrvalue > GetCodec(const JlsParameters& info, const JlsCustomParameters&); private: STRATEGY* GetCodecImpl(const JlsParameters& info); }; diff --git a/dcmjpls/libcharls/jpegls.cc b/dcmjpls/libcharls/jpegls.cc index d7e05c61..c451702d 100644 --- a/dcmjpls/libcharls/jpegls.cc +++ b/dcmjpls/libcharls/jpegls.cc @@ -79,7 +79,7 @@ OFVector rgquant16Ll = CreateQLutLossless(16); template -OFauto_ptr JlsCodecFactory::GetCodec(const JlsParameters& info, const JlsCustomParameters& presets) +OFrvalue > JlsCodecFactory::GetCodec(const JlsParameters& info, const JlsCustomParameters& presets) { STRATEGY* pstrategy = NULL; if (presets.RESET != 0 && presets.RESET != BASIC_RESET) @@ -98,7 +98,7 @@ OFauto_ptr JlsCodecFactory::GetCodec(const JlsParameters& in { pstrategy->SetPresets(presets); } - return OFauto_ptr(pstrategy); + return OFrvalue >(pstrategy); } diff --git a/dcmjpls/libcharls/scan.h b/dcmjpls/libcharls/scan.h index 5cd25151..0cee4d4a 100644 --- a/dcmjpls/libcharls/scan.h +++ b/dcmjpls/libcharls/scan.h @@ -790,11 +790,11 @@ ProcessLine* JlsCodec::CreateProcess(void* pvoidOut) template size_t JlsCodec::EncodeScan(const void* rawData, BYTE **ptr, size_t *size, size_t offset, bool compare) { - STRATEGY::_processLine = OFauto_ptr(CreateProcess(const_cast(rawData))); + STRATEGY::_processLine.reset(CreateProcess(const_cast(rawData))); if (compare) { - STRATEGY::_qdecoder = OFauto_ptr(new JlsCodec(traits, Info())); + STRATEGY::_qdecoder.reset(new JlsCodec(traits, Info())); STRATEGY::_qdecoder->Init(ptr, size, offset); } @@ -809,7 +809,7 @@ size_t JlsCodec::EncodeScan(const void* rawData, BYTE **ptr, si template size_t JlsCodec::DecodeScan(void* rawData, const JlsRect& rect, BYTE **ptr, size_t *size, size_t offset, bool bCompare) { - STRATEGY::_processLine = OFauto_ptr(CreateProcess(rawData)); + STRATEGY::_processLine.reset(CreateProcess(rawData)); _bCompare = bCompare; diff --git a/dcmjpls/libsrc/CMakeLists.txt b/dcmjpls/libsrc/CMakeLists.txt index 8a7b4e89..7e84f4dc 100644 --- a/dcmjpls/libsrc/CMakeLists.txt +++ b/dcmjpls/libsrc/CMakeLists.txt @@ -1,5 +1,5 @@ # declare additional include directories -INCLUDE_DIRECTORIES(${dcmjpls_SOURCE_DIR}/include ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include ${dcmimage_SOURCE_DIR}/include ${dcmjpls_SOURCE_DIR}/libcharls ${ZLIB_INCDIR}) +INCLUDE_DIRECTORIES("${dcmjpls_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" "${dcmimage_SOURCE_DIR}/include" "${dcmjpls_SOURCE_DIR}/libcharls" ${ZLIB_INCDIR}) # create library from source files DCMTK_ADD_LIBRARY(dcmjpls djcparam djdecode djencode djrparam djcodecd djutils djcodece) diff --git a/dcmjpls/libsrc/Makefile.dep b/dcmjpls/libsrc/Makefile.dep index db237192..cd51a06c 100644 --- a/dcmjpls/libsrc/Makefile.dep +++ b/dcmjpls/libsrc/Makefile.dep @@ -21,7 +21,10 @@ djcodecd.o: djcodecd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -39,9 +42,9 @@ djcodecd.o: djcodecd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -92,7 +95,10 @@ djcodece.o: djcodece.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -110,9 +116,9 @@ djcodece.o: djcodece.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -192,7 +198,10 @@ djcparam.o: djcparam.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -210,9 +219,9 @@ djcparam.o: djcparam.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -240,7 +249,10 @@ djdecode.o: djdecode.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -258,9 +270,9 @@ djdecode.o: djdecode.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmjpls/dldefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dccodec.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -291,7 +303,10 @@ djencode.o: djencode.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -309,9 +324,9 @@ djencode.o: djencode.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmjpls/dldefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ @@ -354,7 +369,10 @@ djrparam.o: djrparam.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -371,9 +389,9 @@ djrparam.o: djrparam.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \ @@ -400,7 +418,10 @@ djutils.o: djutils.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -418,9 +439,9 @@ djutils.o: djutils.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmjpls/dldefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h diff --git a/dcmjpls/libsrc/djcodecd.cc b/dcmjpls/libsrc/djcodecd.cc index 3e757597..f3c4fb7d 100644 --- a/dcmjpls/libsrc/djcodecd.cc +++ b/dcmjpls/libsrc/djcodecd.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2016, OFFIS e.V. + * Copyright (C) 2007-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -69,8 +69,7 @@ OFBool DJLSDecoderBase::canChangeCoding( // this codec only handles conversion from JPEG-LS to uncompressed. DcmXfer newRep(newRepType); - if (newRep.isNotEncapsulated() && - ((oldRepType == EXS_JPEGLSLossless)||(oldRepType == EXS_JPEGLSLossy))) + if (newRep.isNotEncapsulated() && (oldRepType == supportedTransferSyntax())) return OFTrue; return OFFalse; @@ -181,17 +180,23 @@ OFCondition DJLSDecoderBase::decode( result = ((DcmItem *)dataset)->putAndInsertString(DCM_NumberOfFrames, numBuf); } - if (result.good()) + if (result.good() && (dataset->ident() == EVR_dataset)) { + DcmItem *ditem = OFreinterpret_cast(DcmItem*, dataset); + // the following operations do not affect the Image Pixel Module // but other modules such as SOP Common. We only perform these // changes if we're on the main level of the dataset, // which should always identify itself as dataset, not as item. - if ((dataset->ident() == EVR_dataset) && (djcp->getUIDCreation() == EJLSUC_always)) + if (djcp->getUIDCreation() == EJLSUC_always) { // create new SOP instance UID - result = DcmCodec::newInstance((DcmItem *)dataset, NULL, NULL, NULL); + result = DcmCodec::newInstance(ditem, NULL, NULL, NULL); } + + // set Lossy Image Compression to "01" (see DICOM part 3, C.7.6.1.1.5) + if (result.good() && (supportedTransferSyntax() == EXS_JPEGLSLossy)) result = ditem->putAndInsertString(DCM_LossyImageCompression, "01"); + } return result; diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc index 64686ff0..d13da73c 100644 --- a/dcmjpls/libsrc/djcodece.cc +++ b/dcmjpls/libsrc/djcodece.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2007-2015, OFFIS e.V. + * Copyright (C) 2007-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -669,7 +669,8 @@ OFCondition DJLSEncoderBase::compressRawFrame( if (result.good()) { - compressedSize = bytesWritten; + compressedSize = OFstatic_cast(unsigned long, bytesWritten); + fixPaddingIfNecessary(OFstatic_cast(Uint8 *, buffer), size, compressedSize); result = pixelSequence->storeCompressedFrame(offsetList, buffer, compressedSize, fragmentSize); } @@ -1060,7 +1061,8 @@ OFCondition DJLSEncoderBase::compressCookedFrame( if (result.good()) { // 'compressed_buffer_size' now contains the size of the compressed data in buffer - compressedSize = bytesWritten; + compressedSize = OFstatic_cast(unsigned long, bytesWritten); + fixPaddingIfNecessary(OFstatic_cast(Uint8 *, buffer), compressed_buffer_size, compressedSize); result = pixelSequence->storeCompressedFrame(offsetList, compressed_buffer, compressedSize, fragmentSize); } @@ -1121,3 +1123,32 @@ OFCondition DJLSEncoderBase::convertToSampleInterleaved( } return EC_Normal; } + +void DJLSEncoderBase::fixPaddingIfNecessary( + Uint8 *buffer, + size_t bufSize, + unsigned long &bytesWritten) +{ + // check if an odd number of bytes was written and the buffer + // has space for the needed pad byte (which should in practice + // always be the case because the buffer always has even length). + if (buffer && ((bytesWritten % 2 )> 0) && (bufSize > bytesWritten)) + { + // first write a zero pad byte after the end of the JPEG-LS bitstream + buffer[bytesWritten++] = 0; + +#ifndef DISABLE_FF_JPEG_BITSTREAM_PADDING + // look for the EOI marker + if ((bytesWritten > 2) && (buffer[bytesWritten-3] == 0xFF) && (buffer[bytesWritten-2] == 0xD9)) + { + // we now have ff/d9/00 at the end of the JPEG bitstream, + // i.e. an end of image (EOI) marker followed by a pad byte. + // Replace this with ff/ff/d9, which is an "extended" EOI marker + // ending on an even byte boundary. + buffer[bytesWritten-2] = 0xFF; + buffer[bytesWritten-1] = 0xD9; + } + } +#endif + return; +} diff --git a/dcmnet/CMakeLists.txt b/dcmnet/CMakeLists.txt index 34406332..98730557 100644 --- a/dcmnet/CMakeLists.txt +++ b/dcmnet/CMakeLists.txt @@ -2,7 +2,7 @@ PROJECT(dcmnet) # declare include directories which hold for all subdirectories -INCLUDE_DIRECTORIES(${dcmnet_SOURCE_DIR}/include ${dcmtls_SOURCE_DIR}/include ${OPENSSL_INCDIR} ${ofstd_SOURCE_DIR}/include ${oflog_SOURCE_DIR}/include ${dcmdata_SOURCE_DIR}/include ${ZLIB_INCDIR}) +INCLUDE_DIRECTORIES("${dcmnet_SOURCE_DIR}/include" "${dcmtls_SOURCE_DIR}/include" ${OPENSSL_INCDIR} "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" ${ZLIB_INCDIR}) # recurse into subdirectories FOREACH(SUBDIR libsrc apps include docs etc tests) diff --git a/dcmnet/apps/CMakeLists.txt b/dcmnet/apps/CMakeLists.txt index 4fe5a674..c3837ef4 100644 --- a/dcmnet/apps/CMakeLists.txt +++ b/dcmnet/apps/CMakeLists.txt @@ -1,5 +1,5 @@ # declare additional include directories needed for compression support -INCLUDE_DIRECTORIES(${dcmjpls_SOURCE_DIR}/include ${dcmjpeg_SOURCE_DIR}/include ${dcmimage_SOURCE_DIR}/include ${dcmimgle_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES("${dcmjpls_SOURCE_DIR}/include" "${dcmjpeg_SOURCE_DIR}/include" "${dcmimage_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include") # declare executables FOREACH(PROGRAM dcmrecv dcmsend echoscu findscu getscu movescu storescp storescu termscu) @@ -9,7 +9,7 @@ ENDFOREACH(PROGRAM) # declare installation files IF(WITH_OPENSSL) IF(WIN32) - INSTALL(FILES ${OPENSSL_BINDIR}/dcmtkeay.dll ${OPENSSL_BINDIR}/dcmtkssl.dll DESTINATION ${DCMTK_INSTALL_BINDIR} COMPONENT bin) + INSTALL(FILES "${OPENSSL_BINDIR}/dcmtkeay.dll" "${OPENSSL_BINDIR}/dcmtkssl.dll" DESTINATION "${DCMTK_INSTALL_BINDIR}" COMPONENT bin) ENDIF(WIN32) ENDIF(WITH_OPENSSL) diff --git a/dcmnet/apps/Makefile.dep b/dcmnet/apps/Makefile.dep index bb92c416..6be88978 100644 --- a/dcmnet/apps/Makefile.dep +++ b/dcmnet/apps/Makefile.dep @@ -12,6 +12,7 @@ dcmrecv.o: dcmrecv.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ @@ -35,7 +36,9 @@ dcmrecv.o: dcmrecv.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -71,8 +74,6 @@ dcmrecv.o: dcmrecv.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -118,13 +119,13 @@ dcmrecv.o: dcmrecv.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dcompat.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \ - ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \ - ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \ - ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ - ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ - ../include/dcmtk/dcmnet/dccfprmp.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \ + ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \ + ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \ + ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \ + ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \ + ../include/dcmtk/dcmnet/diutil.h dcmsend.o: dcmsend.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -139,6 +140,7 @@ dcmsend.o: dcmsend.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ @@ -164,7 +166,9 @@ dcmsend.o: dcmsend.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -198,8 +202,6 @@ dcmsend.o: dcmsend.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -246,11 +248,11 @@ dcmsend.o: dcmsend.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dcasccff.h \ - ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \ - ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ - ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ - ../include/dcmtk/dcmnet/dccfprmp.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \ + ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \ + ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \ + ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \ + ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \ ../../dcmjpeg/include/dcmtk/dcmjpeg/djdecode.h \ ../../dcmjpeg/include/dcmtk/dcmjpeg/djutils.h \ ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \ @@ -291,7 +293,10 @@ echoscu.o: echoscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -307,14 +312,14 @@ echoscu.o: echoscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/assoc.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -359,7 +364,10 @@ findscu.o: findscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -377,9 +385,9 @@ findscu.o: findscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -391,7 +399,7 @@ findscu.o: findscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/assoc.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -428,7 +436,8 @@ getscu.o: getscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ - ../../config/include/dcmtk/config/arith.h ../include/dcmtk/dcmnet/scu.h \ + ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h ../include/dcmtk/dcmnet/scu.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -442,7 +451,9 @@ getscu.o: getscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -480,8 +491,6 @@ getscu.o: getscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -529,11 +538,11 @@ getscu.o: getscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dcasccff.h \ - ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \ - ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ - ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ - ../include/dcmtk/dcmnet/dccfprmp.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \ + ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \ + ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \ + ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \ + ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \ ../../dcmdata/include/dcmtk/dcmdata/dcostrmz.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpath.h movescu.o: movescu.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -550,6 +559,7 @@ movescu.o: movescu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ @@ -572,7 +582,9 @@ movescu.o: movescu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -587,7 +599,7 @@ movescu.o: movescu.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/assoc.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -624,6 +636,7 @@ storescp.o: storescp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ @@ -649,7 +662,9 @@ storescp.o: storescp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -664,7 +679,7 @@ storescp.o: storescp.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/assoc.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -679,8 +694,6 @@ storescp.o: storescp.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/dcasccfg.h \ ../include/dcmtk/dcmnet/dccftsmp.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ ../include/dcmtk/dcmnet/dccfprmp.h ../include/dcmtk/dcmnet/dcasccff.h \ @@ -711,6 +724,7 @@ storescu.o: storescu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ @@ -733,7 +747,9 @@ storescu.o: storescu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -748,7 +764,7 @@ storescu.o: storescu.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/assoc.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -763,8 +779,6 @@ storescu.o: storescu.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/dcasccfg.h \ ../include/dcmtk/dcmnet/dccftsmp.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ ../include/dcmtk/dcmnet/dccfprmp.h ../include/dcmtk/dcmnet/dcasccff.h \ @@ -799,6 +813,7 @@ termscu.o: termscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ @@ -821,7 +836,9 @@ termscu.o: termscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -836,7 +853,7 @@ termscu.o: termscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/dimse.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dimse.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ diff --git a/dcmnet/apps/Makefile.in b/dcmnet/apps/Makefile.in index 9a80242c..765e1dd1 100644 --- a/dcmnet/apps/Makefile.in +++ b/dcmnet/apps/Makefile.in @@ -30,7 +30,7 @@ LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include \ LIBDIRS = -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc -L$(oflogdir)/libsrc \ -L$(dcmdatadir)/libsrc -L$(dcmtlsdir)/libsrc $(compr_libdirs) LOCALLIBS = -ldcmnet -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(TCPWRAPPERLIBS) \ - $(CHARCONVLIBS) + $(CHARCONVLIBS) $(MATHLIBS) DCMTLSLIBS = -ldcmtls COMPR_LIBS = -ldcmjpls -lcharls -ldcmjpeg -lijg8 -lijg12 -lijg16 -ldcmimage -ldcmimgle @@ -42,33 +42,33 @@ progs = echoscu storescu storescp findscu movescu termscu getscu dcmsend dcmrecv all: $(progs) echoscu: echoscu.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(LIBS) # add $(COMPR_LIBS) to the linking instructions if "storescu" is compiled # with ON_THE_FLY_COMPRESSION defined (see "config/docs/macros.txt") storescu: storescu.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(LIBS) storescp: storescp.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(LIBS) findscu: findscu.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(DCMTLSLIBS) $(OPENSSLLIBS) $(LIBS) movescu: movescu.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) termscu: termscu.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) getscu: getscu.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) dcmsend: dcmsend.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(COMPR_LIBS) $(LOCALLIBS) $(TIFFLIBS) $(PNGLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(COMPR_LIBS) $(LOCALLIBS) $(TIFFLIBS) $(PNGLIBS) $(LIBS) dcmrecv: dcmrecv.o - $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(MATHLIBS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS) install: all $(configdir)/mkinstalldirs $(DESTDIR)$(bindir) diff --git a/dcmnet/apps/echoscu.cc b/dcmnet/apps/echoscu.cc index c486db1d..a24b2219 100644 --- a/dcmnet/apps/echoscu.cc +++ b/dcmnet/apps/echoscu.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -147,23 +147,11 @@ main(int argc, char *argv[]) T_ASC_Network *net; T_ASC_Parameters *params; - DIC_NODENAME localHost; DIC_NODENAME peerHost; T_ASC_Association *assoc; OFString temp_str; -#ifdef HAVE_GUSI_H - /* needed for Macintosh */ - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - -#ifdef HAVE_WINSOCK_H - WSAData winSockData; - /* we need at least version 1.1 */ - WORD winSockVersionNeeded = MAKEWORD( 1, 1 ); - WSAStartup(winSockVersionNeeded, &winSockData); -#endif + OFStandard::initializeNetwork(); char tempstr[20]; OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION , "DICOM verification (C-ECHO) SCU", rcsid); @@ -540,9 +528,8 @@ main(int argc, char *argv[]) /* Figure out the presentation addresses and copy the */ /* corresponding values into the association parameters.*/ - gethostname(localHost, sizeof(localHost) - 1); sprintf(peerHost, "%s:%d", opt_peer, OFstatic_cast(int, opt_port)); - ASC_setPresentationAddresses(params, localHost, peerHost); + ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), peerHost); /* Set the presentation contexts which will be negotiated */ /* when the network connection will be established */ @@ -660,9 +647,7 @@ main(int argc, char *argv[]) exit(1); } -#ifdef HAVE_WINSOCK_H - WSACleanup(); -#endif + OFStandard::shutdownNetwork(); #ifdef WITH_OPENSSL if (tLayer && opt_writeSeedFile) diff --git a/dcmnet/apps/findscu.cc b/dcmnet/apps/findscu.cc index 3a2e1c8b..d57b4986 100644 --- a/dcmnet/apps/findscu.cc +++ b/dcmnet/apps/findscu.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2014, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -20,6 +20,7 @@ */ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + #include "dcmtk/dcmnet/dfindscu.h" #include "dcmtk/dcmnet/diutil.h" #include "dcmtk/dcmdata/cmdlnarg.h" @@ -99,17 +100,7 @@ int main(int argc, char *argv[]) */ OFBool opt_automaticDataCorrection = OFFalse; -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - -#ifdef HAVE_WINSOCK_H - WSAData winSockData; - /* we need at least version 1.1 */ - WORD winSockVersionNeeded = MAKEWORD( 1, 1 ); - WSAStartup(winSockVersionNeeded, &winSockData); -#endif + OFStandard::initializeNetwork(); char tempstr[20]; OFString temp_str; @@ -635,9 +626,7 @@ int main(int argc, char *argv[]) cond = findscu.dropNetwork(); if (cond.bad()) OFLOG_ERROR(findscuLogger, DimseCondition::dump(temp_str, cond)); -#ifdef HAVE_WINSOCK_H - WSACleanup(); -#endif + OFStandard::shutdownNetwork(); #ifdef WITH_OPENSSL if (tLayer && opt_writeSeedFile) diff --git a/dcmnet/apps/getscu.cc b/dcmnet/apps/getscu.cc index 1e7f85ef..533d004a 100644 --- a/dcmnet/apps/getscu.cc +++ b/dcmnet/apps/getscu.cc @@ -21,10 +21,6 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/ofstd/ofconapp.h" #include "dcmtk/ofstd/oflist.h" #include "dcmtk/dcmnet/scu.h" @@ -90,12 +86,6 @@ main(int argc, char *argv[]) const char *opt_ourTitle = APPLICATIONTITLE; OFList fileNameList; -#ifdef HAVE_GUSI_H - /* needed for Macintosh */ - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - char tempstr[20]; OFString temp_str; OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION , "DICOM retrieve (C-GET) SCU", rcsid); @@ -148,6 +138,8 @@ main(int argc, char *argv[]) cmd.addOption("--prefer-mpeg4-2-2d", "+x2", "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (2D)"); cmd.addOption("--prefer-mpeg4-2-3d", "+x3", "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (3D)"); cmd.addOption("--prefer-mpeg4-2-st", "+xo", "prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS"); + cmd.addOption("--prefer-hevc", "+x4", "prefer HEVC/H.265 Main Profile / Level 5.1 TS"); + cmd.addOption("--prefer-hevc10", "+x5", "prefer HEVC/H.265 Main 10 Profile / Level 5.1 TS"); cmd.addOption("--prefer-rle", "+xr", "prefer RLE lossless TS"); #ifdef WITH_ZLIB cmd.addOption("--prefer-deflated", "+xd", "prefer deflated explicit VR little endian TS"); @@ -254,6 +246,8 @@ main(int argc, char *argv[]) if (cmd.findOption("--prefer-mpeg4-2-2d")) opt_store_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For2DVideo; if (cmd.findOption("--prefer-mpeg4-2-3d")) opt_store_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For3DVideo; if (cmd.findOption("--prefer-mpeg4-2-st")) opt_store_networkTransferSyntax = EXS_MPEG4StereoHighProfileLevel4_2; + if (cmd.findOption("--prefer-hevc")) opt_store_networkTransferSyntax = EXS_HEVCMainProfileLevel5_1; + if (cmd.findOption("--prefer-hevc10")) opt_store_networkTransferSyntax = EXS_HEVCMain10ProfileLevel5_1; if (cmd.findOption("--prefer-rle")) opt_store_networkTransferSyntax = EXS_RLELossless; #ifdef WITH_ZLIB if (cmd.findOption("--prefer-deflated")) opt_store_networkTransferSyntax = EXS_DeflatedLittleEndianExplicit; diff --git a/dcmnet/apps/movescu.cc b/dcmnet/apps/movescu.cc index 17271f9b..cf786432 100644 --- a/dcmnet/apps/movescu.cc +++ b/dcmnet/apps/movescu.cc @@ -27,11 +27,6 @@ #define INCLUDE_CSTDARG #define INCLUDE_CERRNO #include "dcmtk/ofstd/ofstdinc.h" - -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/ofstd/ofconapp.h" #include "dcmtk/dcmnet/dicom.h" @@ -233,28 +228,16 @@ addPresentationContext(T_ASC_Parameters *params, int main(int argc, char *argv[]) { - T_ASC_Parameters *params = NULL; - const char *opt_peer; - OFCmdUnsignedInt opt_port = 104; - DIC_NODENAME localHost; - DIC_NODENAME peerHost; - T_ASC_Association *assoc = NULL; - const char *opt_peerTitle = PEERAPPLICATIONTITLE; - const char *opt_ourTitle = APPLICATIONTITLE; - OFList fileNameList; - -#ifdef HAVE_GUSI_H - /* needed for Macintosh */ - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif + T_ASC_Parameters *params = NULL; + const char *opt_peer; + OFCmdUnsignedInt opt_port = 104; + DIC_NODENAME peerHost; + T_ASC_Association *assoc = NULL; + const char *opt_peerTitle = PEERAPPLICATIONTITLE; + const char *opt_ourTitle = APPLICATIONTITLE; + OFList fileNameList; -#ifdef HAVE_WINSOCK_H - WSAData winSockData; - /* we need at least version 1.1 */ - WORD winSockVersionNeeded = MAKEWORD( 1, 1 ); - WSAStartup(winSockVersionNeeded, &winSockData); -#endif + OFStandard::initializeNetwork(); char tempstr[20]; OFString temp_str; @@ -311,6 +294,8 @@ main(int argc, char *argv[]) cmd.addOption("--prefer-mpeg4-2-2d", "+x2", "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (2D)"); cmd.addOption("--prefer-mpeg4-2-3d", "+x3", "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (3D)"); cmd.addOption("--prefer-mpeg4-2-st", "+xo", "prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS"); + cmd.addOption("--prefer-hevc", "+x4", "prefer HEVC/H.265 Main Profile / Level 5.1 TS"); + cmd.addOption("--prefer-hevc10", "+x5", "prefer HEVC/H.265 Main 10 Profile / Level 5.1 TS"); cmd.addOption("--prefer-rle", "+xr", "prefer RLE lossless TS"); #ifdef WITH_ZLIB cmd.addOption("--prefer-deflated", "+xd", "prefer deflated explicit VR little endian TS"); @@ -472,6 +457,8 @@ main(int argc, char *argv[]) if (cmd.findOption("--prefer-mpeg4-2-2d")) opt_in_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For2DVideo; if (cmd.findOption("--prefer-mpeg4-2-3d")) opt_in_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For3DVideo; if (cmd.findOption("--prefer-mpeg4-2-st")) opt_in_networkTransferSyntax = EXS_MPEG4StereoHighProfileLevel4_2; + if (cmd.findOption("--prefer-hevc")) opt_in_networkTransferSyntax = EXS_HEVCMainProfileLevel5_1; + if (cmd.findOption("--prefer-hevc10")) opt_in_networkTransferSyntax = EXS_HEVCMain10ProfileLevel5_1; if (cmd.findOption("--prefer-rle")) opt_in_networkTransferSyntax = EXS_RLELossless; #ifdef WITH_ZLIB if (cmd.findOption("--prefer-deflated")) opt_in_networkTransferSyntax = EXS_DeflatedLittleEndianExplicit; @@ -574,6 +561,8 @@ main(int argc, char *argv[]) app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-2d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo); app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-3d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo); app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-st", opt_in_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2); + app.checkConflict("--write-xfer-little", "--prefer-hevc", opt_in_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1); + app.checkConflict("--write-xfer-little", "--prefer-hevc10", opt_in_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1); app.checkConflict("--write-xfer-little", "--prefer-rle", opt_in_networkTransferSyntax == EXS_RLELossless); // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed. opt_writeTransferSyntax = EXS_LittleEndianExplicit; @@ -596,6 +585,8 @@ main(int argc, char *argv[]) app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-2d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo); app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-3d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo); app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-st", opt_in_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2); + app.checkConflict("--write-xfer-big", "--prefer-hevc", opt_in_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1); + app.checkConflict("--write-xfer-big", "--prefer-hevc10", opt_in_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1); app.checkConflict("--write-xfer-big", "--prefer-rle", opt_in_networkTransferSyntax == EXS_RLELossless); // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed. opt_writeTransferSyntax = EXS_BigEndianExplicit; @@ -618,6 +609,8 @@ main(int argc, char *argv[]) app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-2d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo); app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-3d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo); app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-st", opt_in_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2); + app.checkConflict("--write-xfer-implicit", "--prefer-hevc", opt_in_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1); + app.checkConflict("--write-xfer-implicit", "--prefer-hevc10", opt_in_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1); app.checkConflict("--write-xfer-implicit", "--prefer-rle", opt_in_networkTransferSyntax == EXS_RLELossless); // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed. opt_writeTransferSyntax = EXS_LittleEndianImplicit; @@ -641,6 +634,8 @@ main(int argc, char *argv[]) app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-2d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo); app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-3d", opt_in_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo); app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-st", opt_in_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2); + app.checkConflict("--write-xfer-deflated", "--prefer-hevc", opt_in_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1); + app.checkConflict("--write-xfer-deflated", "--prefer-hevc10", opt_in_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1); app.checkConflict("--write-xfer-deflated", "--prefer-rle", opt_in_networkTransferSyntax == EXS_RLELossless); opt_writeTransferSyntax = EXS_DeflatedLittleEndianExplicit; } @@ -800,9 +795,8 @@ main(int argc, char *argv[]) } ASC_setAPTitles(params, opt_ourTitle, opt_peerTitle, NULL); - gethostname(localHost, sizeof(localHost) - 1); sprintf(peerHost, "%s:%d", opt_peer, OFstatic_cast(int, opt_port)); - ASC_setPresentationAddresses(params, localHost, peerHost); + ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), peerHost); /* * We also add a presentation context for the corresponding @@ -921,9 +915,7 @@ main(int argc, char *argv[]) exit(EXITCODE_CANNOT_CLOSE_ASSOCIATION); } -#ifdef HAVE_WINSOCK_H - WSACleanup(); -#endif + OFStandard::shutdownNetwork(); return cmove_status_code; } @@ -1155,6 +1147,22 @@ acceptSubAssoc(T_ASC_Network *aNet, T_ASC_Association **assoc) transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax; numTransferSyntaxes = 4; break; + case EXS_HEVCMainProfileLevel5_1: + /* we prefer HEVC/H.265 Main Profile/L5.1 */ + transferSyntaxes[0] = UID_HEVCMainProfileLevel5_1TransferSyntax; + transferSyntaxes[1] = UID_LittleEndianExplicitTransferSyntax; + transferSyntaxes[2] = UID_BigEndianExplicitTransferSyntax; + transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax; + numTransferSyntaxes = 4; + break; + case EXS_HEVCMain10ProfileLevel5_1: + /* we prefer HEVC/H.265 Main 10 Profile/L5.1 */ + transferSyntaxes[0] = UID_HEVCMain10ProfileLevel5_1TransferSyntax; + transferSyntaxes[1] = UID_LittleEndianExplicitTransferSyntax; + transferSyntaxes[2] = UID_BigEndianExplicitTransferSyntax; + transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax; + numTransferSyntaxes = 4; + break; case EXS_RLELossless: /* we prefer RLE Lossless */ transferSyntaxes[0] = UID_RLELosslessTransferSyntax; @@ -1374,6 +1382,9 @@ storeSCPCallback( { OFLOG_ERROR(movescuLogger, "cannot write DICOM file: " << ofname); rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources; + + // delete incomplete file + OFStandard::deleteFile(ofname); } /* should really check the image to make sure it is consistent, @@ -1465,11 +1476,11 @@ static OFCondition storeSCP( /* remove file */ if (!opt_ignore) { - if (strcmp(imageFileName, NULL_DEVICE_NAME) != 0) unlink(imageFileName); + if (strcmp(imageFileName, NULL_DEVICE_NAME) != 0) OFStandard::deleteFile(imageFileName); } #ifdef _WIN32 } else if (opt_ignore) { - if (strcmp(imageFileName, NULL_DEVICE_NAME) != 0) unlink(imageFileName); // delete the temporary file + if (strcmp(imageFileName, NULL_DEVICE_NAME) != 0) OFStandard::deleteFile(imageFileName); // delete the temporary file #endif } diff --git a/dcmnet/apps/storescp.cc b/dcmnet/apps/storescp.cc index 0a6678a1..ce427fad 100644 --- a/dcmnet/apps/storescp.cc +++ b/dcmnet/apps/storescp.cc @@ -41,10 +41,6 @@ BEGIN_EXTERN_C #endif END_EXTERN_C -#ifdef HAVE_GUSI_H -#include -#endif - #ifdef HAVE_WINDOWS_H #include /* for _mkdir() */ #endif @@ -238,18 +234,7 @@ int main(int argc, char *argv[]) T_ASC_Network *net; DcmAssociationConfiguration asccfg; -#ifdef HAVE_GUSI_H - /* needed for Macintosh */ - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - -#ifdef HAVE_WINSOCK_H - WSAData winSockData; - /* we need at least version 1.1 */ - WORD winSockVersionNeeded = MAKEWORD( 1, 1 ); - WSAStartup(winSockVersionNeeded, &winSockData); -#endif + OFStandard::initializeNetwork(); OFString temp_str; OFOStringStream optStream; @@ -298,6 +283,8 @@ int main(int argc, char *argv[]) cmd.addOption("--prefer-mpeg4-2-2d", "+x2", "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (2D)"); cmd.addOption("--prefer-mpeg4-2-3d", "+x3", "prefer MPEG4 AVC/H.264 HP / Level 4.2 TS (3D)"); cmd.addOption("--prefer-mpeg4-2-st", "+xo", "prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS"); + cmd.addOption("--prefer-hevc", "+x4", "prefer HEVC/H.265 Main Profile / Level 5.1 TS"); + cmd.addOption("--prefer-hevc10", "+x5", "prefer HEVC/H.265 Main 10 Profile / Level 5.1 TS"); cmd.addOption("--prefer-rle", "+xr", "prefer RLE lossless TS"); #ifdef WITH_ZLIB cmd.addOption("--prefer-deflated", "+xd", "prefer deflated expl. VR little endian TS"); @@ -559,6 +546,8 @@ int main(int argc, char *argv[]) if (cmd.findOption("--prefer-mpeg4-2-2d")) opt_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For2DVideo; if (cmd.findOption("--prefer-mpeg4-2-3d")) opt_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For3DVideo; if (cmd.findOption("--prefer-mpeg4-2-st")) opt_networkTransferSyntax = EXS_MPEG4StereoHighProfileLevel4_2; + if (cmd.findOption("--prefer-hevc")) opt_networkTransferSyntax = EXS_HEVCMainProfileLevel5_1; + if (cmd.findOption("--prefer-hevc10")) opt_networkTransferSyntax = EXS_HEVCMain10ProfileLevel5_1; if (cmd.findOption("--prefer-rle")) opt_networkTransferSyntax = EXS_RLELossless; #ifdef WITH_ZLIB if (cmd.findOption("--prefer-deflated")) opt_networkTransferSyntax = EXS_DeflatedLittleEndianExplicit; @@ -624,6 +613,8 @@ int main(int argc, char *argv[]) app.checkConflict("--config-file", "--prefer-mpeg4-2-2d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo); app.checkConflict("--config-file", "--prefer-mpeg4-2-3d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo); app.checkConflict("--config-file", "--prefer-mpeg4-2-st", opt_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2); + app.checkConflict("--config-file", "--prefer-hevc", opt_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1); + app.checkConflict("--config-file", "--prefer-hevc10", opt_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1); app.checkConflict("--config-file", "--prefer-rle", opt_networkTransferSyntax == EXS_RLELossless); #ifdef WITH_ZLIB app.checkConflict("--config-file", "--prefer-deflated", opt_networkTransferSyntax == EXS_DeflatedLittleEndianExplicit); @@ -705,6 +696,8 @@ int main(int argc, char *argv[]) app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-2d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo); app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-3d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo); app.checkConflict("--write-xfer-little", "--prefer-mpeg4-2-st", opt_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2); + app.checkConflict("--write-xfer-little", "--prefer-hevc", opt_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1); + app.checkConflict("--write-xfer-little", "--prefer-hevc10", opt_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1); app.checkConflict("--write-xfer-little", "--prefer-rle", opt_networkTransferSyntax == EXS_RLELossless); // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed. opt_writeTransferSyntax = EXS_LittleEndianExplicit; @@ -727,6 +720,8 @@ int main(int argc, char *argv[]) app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-2d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo); app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-3d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo); app.checkConflict("--write-xfer-big", "--prefer-mpeg4-2-st", opt_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2); + app.checkConflict("--write-xfer-big", "--prefer-hevc", opt_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1); + app.checkConflict("--write-xfer-big", "--prefer-hevc10", opt_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1); app.checkConflict("--write-xfer-big", "--prefer-rle", opt_networkTransferSyntax == EXS_RLELossless); // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed. opt_writeTransferSyntax = EXS_BigEndianExplicit; @@ -749,6 +744,8 @@ int main(int argc, char *argv[]) app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-2d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo); app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-3d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo); app.checkConflict("--write-xfer-implicit", "--prefer-mpeg4-2-st", opt_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2); + app.checkConflict("--write-xfer-implicit", "--prefer-hevc", opt_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1); + app.checkConflict("--write-xfer-implicit", "--prefer-hevc10", opt_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1); app.checkConflict("--write-xfer-implicit", "--prefer-rle", opt_networkTransferSyntax == EXS_RLELossless); // we don't have to check a conflict for --prefer-deflated because we can always convert that to uncompressed. opt_writeTransferSyntax = EXS_LittleEndianImplicit; @@ -772,6 +769,8 @@ int main(int argc, char *argv[]) app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-2d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo); app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-3d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo); app.checkConflict("--write-xfer-deflated", "--prefer-mpeg4-2-st", opt_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2); + app.checkConflict("--write-xfer-deflated", "--prefer-hevc", opt_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1); + app.checkConflict("--write-xfer-deflated", "--prefer-hevc10", opt_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1); app.checkConflict("--write-xfer-deflated", "--prefer-rle", opt_networkTransferSyntax == EXS_RLELossless); opt_writeTransferSyntax = EXS_DeflatedLittleEndianExplicit; } @@ -1049,32 +1048,13 @@ int main(int argc, char *argv[]) #elif defined(_WIN32) if (opt_forkedChild) { - // child process - DUL_markProcessAsForkedChild(); - - char buf[256]; - DWORD bytesRead = 0; - HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE); - - // read socket handle number from stdin, i.e. the anonymous pipe - // to which our parent process has written the handle number. - if (ReadFile(hStdIn, buf, sizeof(buf) - 1, &bytesRead, NULL)) - { - // make sure buffer is zero terminated - buf[bytesRead] = '\0'; - dcmExternalSocketHandle.set(atoi(buf)); - } - else - { - OFLOG_ERROR(storescpLogger, "cannot read socket handle: " << GetLastError()); - return 1; - } + // we are a child process in multi-process mode + if (DUL_readSocketHandleAsForkedChild().bad()) return 1; } else { // parent process - if (opt_forkMode) - DUL_requestForkOnTransportConnectionReceipt(argc, argv); + if (opt_forkMode) DUL_requestForkOnTransportConnectionReceipt(argc, argv); } #endif @@ -1214,9 +1194,7 @@ int main(int argc, char *argv[]) return 1; } -#ifdef HAVE_WINSOCK_H - WSACleanup(); -#endif + OFStandard::shutdownNetwork(); #ifdef WITH_OPENSSL delete tLayer; @@ -1473,6 +1451,22 @@ static OFCondition acceptAssociation(T_ASC_Network *net, DcmAssociationConfigura transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax; numTransferSyntaxes = 4; break; + case EXS_HEVCMainProfileLevel5_1: + /* we prefer HEVC/H.265 Main Profile/L5.1 */ + transferSyntaxes[0] = UID_HEVCMainProfileLevel5_1TransferSyntax; + transferSyntaxes[1] = UID_LittleEndianExplicitTransferSyntax; + transferSyntaxes[2] = UID_BigEndianExplicitTransferSyntax; + transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax; + numTransferSyntaxes = 4; + break; + case EXS_HEVCMain10ProfileLevel5_1: + /* we prefer HEVC/H.265 Main 10 Profile/L5.1 */ + transferSyntaxes[0] = UID_HEVCMain10ProfileLevel5_1TransferSyntax; + transferSyntaxes[1] = UID_LittleEndianExplicitTransferSyntax; + transferSyntaxes[2] = UID_BigEndianExplicitTransferSyntax; + transferSyntaxes[3] = UID_LittleEndianImplicitTransferSyntax; + numTransferSyntaxes = 4; + break; case EXS_RLELossless: /* we prefer RLE Lossless */ transferSyntaxes[0] = UID_RLELosslessTransferSyntax; @@ -2015,6 +2009,17 @@ storeSCPCallback( OFLOG_WARN(storescpLogger, "element PatientName " << DCM_PatientName << " absent or empty in data set, using '" << tmpName << "' instead"); } + else + { + DcmElement *patElem = NULL; + OFString charset; + (*imageDataSet)->findAndGetElement(DCM_PatientName, patElem); // patElem cannot be NULL, see above + (*imageDataSet)->findAndGetOFStringArray(DCM_SpecificCharacterSet, charset); + if (!charset.empty() && !(charset == "ISO_IR 100") && (patElem->containsExtendedCharacters())) + { + OFLOG_WARN(storescpLogger, "Patient name not in Latin-1 (charset: " << charset << "), ASCII dir name may be broken"); + } + } /* substitute non-ASCII characters in patient name to ASCII "equivalent" */ const size_t length = tmpName.length(); @@ -2140,6 +2145,9 @@ storeSCPCallback( { OFLOG_ERROR(storescpLogger, "cannot write DICOM file: " << fileName << ": " << cond.text()); rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources; + + // delete incomplete file + OFStandard::deleteFile(fileName); } // check the image to make sure it is consistent, i.e. that its sopClass and sopInstance correspond diff --git a/dcmnet/apps/storescu.cc b/dcmnet/apps/storescu.cc index 91e33c58..f19ec5b4 100644 --- a/dcmnet/apps/storescu.cc +++ b/dcmnet/apps/storescu.cc @@ -33,10 +33,6 @@ BEGIN_EXTERN_C #endif END_EXTERN_C -#ifdef HAVE_GUSI_H -#include -#endif - #include "dcmtk/ofstd/ofstd.h" #include "dcmtk/ofstd/ofconapp.h" #include "dcmtk/ofstd/ofstring.h" @@ -195,22 +191,11 @@ int main(int argc, char *argv[]) T_ASC_Network *net; T_ASC_Parameters *params; - DIC_NODENAME localHost; DIC_NODENAME peerHost; T_ASC_Association *assoc; DcmAssociationConfiguration asccfg; // handler for association configuration profiles -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - -#ifdef HAVE_WINSOCK_H - WSAData winSockData; - /* we need at least version 1.1 */ - WORD winSockVersionNeeded = MAKEWORD( 1, 1 ); - WSAStartup(winSockVersionNeeded, &winSockData); -#endif + OFStandard::initializeNetwork(); OFString temp_str; OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION , "DICOM storage (C-STORE) SCU", rcsid); @@ -267,6 +252,8 @@ int main(int argc, char *argv[]) cmd.addOption("--propose-mpeg4-2-2d", "-x2", "propose MPEG4 AVC/H.264 HP / Level 4.2 TS (2D)"); cmd.addOption("--propose-mpeg4-2-3d", "-x3", "propose MPEG4 AVC/H.264 HP / Level 4.2 TS (3D)"); cmd.addOption("--propose-mpeg4-2-st", "-xo", "propose MPEG4 AVC/H.264 Stereo / Level 4.2 TS"); + cmd.addOption("--propose-hevc", "-x4", "propose HEVC/H.265 Main Profile / Level 5.1 TS"); + cmd.addOption("--propose-hevc10", "-x5", "propose HEVC/H.265 Main 10 Profile / Level 5.1 TS"); cmd.addOption("--propose-rle", "-xr", "propose RLE lossless TS\nand all uncompressed transfer syntaxes"); #ifdef WITH_ZLIB cmd.addOption("--propose-deflated", "-xd", "propose deflated expl. VR little endian TS\nand all uncompressed transfer syntaxes"); @@ -440,6 +427,8 @@ int main(int argc, char *argv[]) if (cmd.findOption("--propose-mpeg4-2-2d")) opt_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For2DVideo; if (cmd.findOption("--propose-mpeg4-2-3d")) opt_networkTransferSyntax = EXS_MPEG4HighProfileLevel4_2_For3DVideo; if (cmd.findOption("--propose-mpeg4-2-st")) opt_networkTransferSyntax = EXS_MPEG4StereoHighProfileLevel4_2; + if (cmd.findOption("--propose-hevc")) opt_networkTransferSyntax = EXS_HEVCMainProfileLevel5_1; + if (cmd.findOption("--propose-hevc10")) opt_networkTransferSyntax = EXS_HEVCMain10ProfileLevel5_1; if (cmd.findOption("--propose-rle")) opt_networkTransferSyntax = EXS_RLELossless; #ifdef WITH_ZLIB if (cmd.findOption("--propose-deflated")) opt_networkTransferSyntax = EXS_DeflatedLittleEndianExplicit; @@ -469,6 +458,8 @@ int main(int argc, char *argv[]) app.checkConflict("--config-file", "--propose-mpeg4-2-2d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For2DVideo); app.checkConflict("--config-file", "--propose-mpeg4-2-3d", opt_networkTransferSyntax == EXS_MPEG4HighProfileLevel4_2_For3DVideo); app.checkConflict("--config-file", "--propose-mpeg4-2-st", opt_networkTransferSyntax == EXS_MPEG4StereoHighProfileLevel4_2); + app.checkConflict("--config-file", "--propose-hevc", opt_networkTransferSyntax == EXS_HEVCMainProfileLevel5_1); + app.checkConflict("--config-file", "--propose-hevc10", opt_networkTransferSyntax == EXS_HEVCMain10ProfileLevel5_1); app.checkConflict("--config-file", "--propose-rle", opt_networkTransferSyntax == EXS_RLELossless); #ifdef WITH_ZLIB app.checkConflict("--config-file", "--propose-deflated", opt_networkTransferSyntax == EXS_DeflatedLittleEndianExplicit); @@ -926,9 +917,8 @@ int main(int argc, char *argv[]) /* Figure out the presentation addresses and copy the */ /* corresponding values into the association parameters.*/ - gethostname(localHost, sizeof(localHost) - 1); sprintf(peerHost, "%s:%d", opt_peer, OFstatic_cast(int, opt_port)); - ASC_setPresentationAddresses(params, localHost, peerHost); + ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), peerHost); /* Configure User Identity Negotiation*/ if (opt_identMode != ASC_USER_IDENTITY_NONE) @@ -1086,9 +1076,7 @@ int main(int argc, char *argv[]) return 1; } -#ifdef HAVE_WINSOCK_H - WSACleanup(); -#endif + OFStandard::shutdownNetwork(); #ifdef WITH_OPENSSL if (tLayer && opt_writeSeedFile) @@ -1229,7 +1217,7 @@ addStoragePresentationContexts(T_ASC_Parameters *params, OFList fallbackSyntaxes; // - If little endian implicit is preferred, we don't need any fallback syntaxes // because it is the default transfer syntax and all applications must support it. - // - If MPEG2 or MPEG4 is preferred, we don't want to propose any fallback solution + // - If MPEG2, MPEG4 or HEVC is preferred, we don't want to propose any fallback solution // because this is not required and we cannot decompress the movie anyway. if ((opt_networkTransferSyntax != EXS_LittleEndianImplicit) && (opt_networkTransferSyntax != EXS_MPEG2MainProfileAtMainLevel) && @@ -1238,7 +1226,9 @@ addStoragePresentationContexts(T_ASC_Parameters *params, (opt_networkTransferSyntax != EXS_MPEG4BDcompatibleHighProfileLevel4_1) && (opt_networkTransferSyntax != EXS_MPEG4HighProfileLevel4_2_For2DVideo) && (opt_networkTransferSyntax != EXS_MPEG4HighProfileLevel4_2_For3DVideo) && - (opt_networkTransferSyntax != EXS_MPEG4StereoHighProfileLevel4_2)) + (opt_networkTransferSyntax != EXS_MPEG4StereoHighProfileLevel4_2) && + (opt_networkTransferSyntax != EXS_HEVCMainProfileLevel5_1) && + (opt_networkTransferSyntax != EXS_HEVCMain10ProfileLevel5_1)) { fallbackSyntaxes.push_back(UID_LittleEndianExplicitTransferSyntax); fallbackSyntaxes.push_back(UID_BigEndianExplicitTransferSyntax); @@ -1578,7 +1568,7 @@ storeSCU(T_ASC_Association *assoc, const char *fname) cond = DIMSE_storeUser(assoc, presID, &req, NULL, dcmff.getDataset(), progressCallback, NULL, opt_blockMode, opt_dimse_timeout, - &rsp, &statusDetail, NULL, OFStandard::getFileSize(fname)); + &rsp, &statusDetail, NULL, OFstatic_cast(long, OFStandard::getFileSize(fname))); /* * If store command completed normally, with a status diff --git a/dcmnet/apps/termscu.cc b/dcmnet/apps/termscu.cc index 3e67b564..4282d94f 100644 --- a/dcmnet/apps/termscu.cc +++ b/dcmnet/apps/termscu.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2005-2010, OFFIS e.V. + * Copyright (C) 2005-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -68,24 +68,12 @@ int main( int argc, char *argv[] ) T_ASC_Network *net; T_ASC_Parameters *params; T_ASC_Association *assoc; - DIC_NODENAME localHost; DIC_NODENAME peerHost; char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" OFFIS_DCMTK_VERSION " " OFFIS_DCMTK_RELEASEDATE " $"; const char* transferSyntaxes[] = { UID_LittleEndianImplicitTransferSyntax, UID_LittleEndianExplicitTransferSyntax, UID_BigEndianExplicitTransferSyntax }; int transferSyntaxCount = 3; -#ifdef HAVE_GUSI_H - // needed for Macintosh - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - -#ifdef HAVE_WINSOCK_H - WSAData winSockData; - // we need at least version 1.1 - WORD winSockVersionNeeded = MAKEWORD( 1, 1 ); - WSAStartup(winSockVersionNeeded, &winSockData); -#endif + OFStandard::initializeNetwork(); char tempstr[20]; OFString temp_str; @@ -197,9 +185,8 @@ int main( int argc, char *argv[] ) // figure out the presentation addresses and copy the // corresponding values into the association parameters. - gethostname( localHost, sizeof( localHost ) - 1 ); sprintf( peerHost, "%s:%d", opt_peer, OFstatic_cast(int, opt_port)); - ASC_setPresentationAddresses( params, localHost, peerHost ); + ASC_setPresentationAddresses( params, OFStandard::getHostName().c_str(), peerHost ); // set the presentation context which will be negotiated // when the network connection will be established @@ -287,9 +274,7 @@ int main( int argc, char *argv[] ) exit( 1 ); } -#ifdef HAVE_WINSOCK_H - WSACleanup(); -#endif + OFStandard::shutdownNetwork(); return( 0 ); } diff --git a/dcmnet/docs/CMakeLists.txt b/dcmnet/docs/CMakeLists.txt index 0e7ee00c..44368c4b 100644 --- a/dcmnet/docs/CMakeLists.txt +++ b/dcmnet/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES asconfig.txt testing.txt DESTINATION ${DCMTK_INSTALL_DOCDIR} COMPONENT doc) +INSTALL(FILES asconfig.txt testing.txt DESTINATION "${DCMTK_INSTALL_DOCDIR}" COMPONENT doc) diff --git a/dcmnet/docs/getscu.man b/dcmnet/docs/getscu.man index bbbd82e3..75f362cb 100644 --- a/dcmnet/docs/getscu.man +++ b/dcmnet/docs/getscu.man @@ -144,6 +144,12 @@ preferred storage transfer syntaxes (incoming associations): +xo --prefer-mpeg4-2-st prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS + +x4 --prefer-hevc + prefer HEVC H.265 Main Profile / Level 5.1 TS + + +x5 --prefer-hevc10 + prefer HEVC H.265 Main 10 Profile / Level 5.1 TS + +xr --prefer-rle prefer RLE lossless TS @@ -264,7 +270,7 @@ SOPInstanceUID). \subsection getscu_dicom_conformance DICOM Conformance -\subsubsection scu_conformance SCU Conformance +\subsubsection getscu_scu_conformance SCU Conformance The \b getscu application supports the following SOP Classes as an SCU: @@ -291,7 +297,7 @@ BigEndianExplicitTransferSyntax 1.2.840.10008.1.2.2 Which transfer syntaxes are actually proposed in what order, can be specified with the \e --propose options. -\subsubsection storage_conformance Storage Conformance +\subsubsection getscu_storage_conformance Storage Conformance The \b getscu application supports the following SOP Classes as an SCP: @@ -457,6 +463,8 @@ MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax 1.2.840.10008.1.2.4.103 MPEG4HighProfileLevel4_2_For2DVideoTransferSyntax 1.2.840.10008.1.2.4.104 MPEG4HighProfileLevel4_2_For3DVideoTransferSyntax 1.2.840.10008.1.2.4.105 MPEG4StereoHighProfileLevel4_2TransferSyntax 1.2.840.10008.1.2.4.106 +HEVCMainProfileLevel5_1TransferSyntax 1.2.840.10008.1.2.4.107 +HEVCMain10ProfileLevel5_1TransferSyntax 1.2.840.10008.1.2.4.108 RLELosslessTransferSyntax 1.2.840.10008.1.2.5 \endverbatim diff --git a/dcmnet/docs/movescu.man b/dcmnet/docs/movescu.man index 32b8e95f..e90de31a 100644 --- a/dcmnet/docs/movescu.man +++ b/dcmnet/docs/movescu.man @@ -147,6 +147,12 @@ preferred network transfer syntaxes (incoming associations): +xo --prefer-mpeg4-2-st prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS + +x4 --prefer-hevc + prefer HEVC H.265 Main Profile / Level 5.1 TS + + +x5 --prefer-hevc10 + prefer HEVC H.265 Main 10 Profile / Level 5.1 TS + +xr --prefer-rle prefer RLE lossless TS @@ -418,7 +424,7 @@ BigEndianExplicitTransferSyntax 1.2.840.10008.1.2.2 Which transfer syntaxes are actually proposed in what order, can be specified with the \e --propose options. -\subsubsection scp_conformance SCP Conformance +\subsubsection movescu_scp_conformance SCP Conformance The \b movescu application supports the following SOP Classes as an SCP: @@ -474,7 +480,11 @@ PseudoColorSoftcopyPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11. BlendingSoftcopyPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.4 XAXRFGrayscaleSoftcopyPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.5 GrayscalePlanarMPRVolumetricPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.6 -CompositingPlanarMPRVolumetricPresentationStateStor. 1.2.840.10008.5.1.4.1.1.11.7 +CompositingPlanarMPRVolumetricPresent.StateStorage 1.2.840.10008.5.1.4.1.1.11.7 +AdvancedBlendingPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.8 +VolumeRenderingVolumetricPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.9 +SegmentedVolumeRenderingVolumetricPres.StateStorage 1.2.840.10008.5.1.4.1.1.11.10 +MultipleVolumeRenderingVolumetricPres.StateStorage 1.2.840.10008.5.1.4.1.1.11.11 XRayAngiographicImageStorage 1.2.840.10008.5.1.4.1.1.12.1 EnhancedXAImageStorage 1.2.840.10008.5.1.4.1.1.12.1.1 XRayRadiofluoroscopicImageStorage 1.2.840.10008.5.1.4.1.1.12.2 @@ -513,6 +523,8 @@ StereometricRelationshipStorage 1.2.840.10008.5.1.4.1.1.77. OphthalmicTomographyImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.4 WideFieldOphthalmicPhoto.Stereogr.Proj.ImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.5 WideFieldOphthalmicPhotogr.3DCoordinatesImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.6 +OphthalmicOpticalCoherenceTomogr.EnFaceImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.7 +OphthalmicOpticalCoh.Tomogr.BscanVolumeAnalysisStor. 1.2.840.10008.5.1.4.1.1.77.1.5.8 VLWholeSlideMicroscopyImageStorage 1.2.840.10008.5.1.4.1.1.77.1.6 RETIRED_VLMultiFrameImageStorage 1.2.840.10008.5.1.4.1.1.77.2 LensometryMeasurementsStorage 1.2.840.10008.5.1.4.1.1.78.1 @@ -545,6 +557,8 @@ RadiopharmaceuticalRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88. ColonCADSRStorage 1.2.840.10008.5.1.4.1.1.88.69 ImplantationPlanSRDocumentStorage 1.2.840.10008.5.1.4.1.1.88.70 AcquisitionContextSRStorage 1.2.840.10008.5.1.4.1.1.88.71 +SimplifiedAdultEchoSRStorage 1.2.840.10008.5.1.4.1.1.88.72 +PatientRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.73 ContentAssessmentResultsStorage 1.2.840.10008.5.1.4.1.1.90.1 EncapsulatedPDFStorage 1.2.840.10008.5.1.4.1.1.104.1 EncapsulatedCDAStorage 1.2.840.10008.5.1.4.1.1.104.2 @@ -553,7 +567,6 @@ LegacyConvertedEnhancedPETImageStorage 1.2.840.10008.5.1.4.1.1.128 RETIRED_StandalonePETCurveStorage 1.2.840.10008.5.1.4.1.1.129 EnhancedPETImageStorage 1.2.840.10008.5.1.4.1.1.130 BasicStructuredDisplayStorage 1.2.840.10008.5.1.4.1.1.131 -CTDefinedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.1 CTPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.2 RTImageStorage 1.2.840.10008.5.1.4.1.1.481.1 RTDoseStorage 1.2.840.10008.5.1.4.1.1.481.2 @@ -576,9 +589,6 @@ DICONDE_EddyCurrentMultiframeImageStorage 1.2.840.10008.5.1.4.1.1.601 DRAFT_RTBeamsDeliveryInstructionStorage 1.2.840.10008.5.1.4.34.1 RTBeamsDeliveryInstructionStorage 1.2.840.10008.5.1.4.34.7 RTBrachyApplicationSetupDeliveryInstructionStorage 1.2.840.10008.5.1.4.34.10 -GenericImplantTemplateStorage 1.2.840.10008.5.1.4.43.1 -ImplantAssemblyTemplateStorage 1.2.840.10008.5.1.4.44.1 -ImplantTemplateGroupStorage 1.2.840.10008.5.1.4.45.1 \endverbatim The \b movescu application will usually accept presentation contexts for all diff --git a/dcmnet/docs/storescp.man b/dcmnet/docs/storescp.man index 7ffa49f4..a1559812 100644 --- a/dcmnet/docs/storescp.man +++ b/dcmnet/docs/storescp.man @@ -129,6 +129,12 @@ preferred network transfer syntaxes (not with --config-file): +xo --prefer-mpeg4-2-st prefer MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS + +x4 --prefer-hevc + prefer HEVC H.265 Main Profile / Level 5.1 TS + + +x5 --prefer-hevc10 + prefer HEVC H.265 Main 10 Profile / Level 5.1 TS + +xr --prefer-rle prefer RLE lossless TS @@ -447,10 +453,21 @@ and for option \e --sort-on-patientname \endverbatim where 'PatientName' is replaced by "ANONYMOUS" if the data element is empty or -absent in the data set. Please note, however, that for option -\e --sort-on-study-uid the same subdirectory will be used for all DICOM objects -that belong to the same study, i.e. in contrast to the other \e --sort-xxx -options there is no guarantee that a study directory is ever completed. +absent in the data set. Any existing patient name is transformed in order to +use only ASCII characters. Please note that in this context only the DICOM +default character set (ASCII, i.e. no entry in attribute Specific Character +Set) and Latin-1 (Specific Character Set valued "ISO_IR 100") are supported. +If another character set is found and the patient name contains non-ASCII +characters, a warning is printed and the transformation is performed as if +Latin-1 character set would be set in the file. This may lead to unreadable +or unexpected patient name directories and behaviour. Thus, it is advisable +to use \e --sort-on-patientname only if Latin-1 or ASCII patient names are +expected to be received. + +For option \e --sort-on-study-uid the same subdirectory will be used for all +DICOM objects that belong to the same study, i.e. in contrast to the other +\e --sort-xxx options there is no guarantee that a study directory is ever +completed. Option \e --timenames creates filenames from timestamps corresponding to the time, \b storescp writes a file to disk. The format is @@ -595,7 +612,11 @@ PseudoColorSoftcopyPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11. BlendingSoftcopyPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.4 XAXRFGrayscaleSoftcopyPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.5 GrayscalePlanarMPRVolumetricPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.6 -CompositingPlanarMPRVolumetricPresentationStateStor. 1.2.840.10008.5.1.4.1.1.11.7 +CompositingPlanarMPRVolumetricPresent.StateStorage 1.2.840.10008.5.1.4.1.1.11.7 +AdvancedBlendingPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.8 +VolumeRenderingVolumetricPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.9 +SegmentedVolumeRenderingVolumetricPres.StateStorage 1.2.840.10008.5.1.4.1.1.11.10 +MultipleVolumeRenderingVolumetricPres.StateStorage 1.2.840.10008.5.1.4.1.1.11.11 XRayAngiographicImageStorage 1.2.840.10008.5.1.4.1.1.12.1 EnhancedXAImageStorage 1.2.840.10008.5.1.4.1.1.12.1.1 XRayRadiofluoroscopicImageStorage 1.2.840.10008.5.1.4.1.1.12.2 @@ -634,6 +655,8 @@ StereometricRelationshipStorage 1.2.840.10008.5.1.4.1.1.77. OphthalmicTomographyImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.4 WideFieldOphthalmicPhoto.Stereogr.Proj.ImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.5 WideFieldOphthalmicPhotogr.3DCoordinatesImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.6 +OphthalmicOpticalCoherenceTomogr.EnFaceImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.7 +OphthalmicOpticalCoh.Tomogr.BscanVolumeAnalysisStor. 1.2.840.10008.5.1.4.1.1.77.1.5.8 VLWholeSlideMicroscopyImageStorage 1.2.840.10008.5.1.4.1.1.77.1.6 RETIRED_VLMultiFrameImageStorage 1.2.840.10008.5.1.4.1.1.77.2 LensometryMeasurementsStorage 1.2.840.10008.5.1.4.1.1.78.1 @@ -667,6 +690,7 @@ ColonCADSRStorage 1.2.840.10008.5.1.4.1.1.88. ImplantationPlanSRDocumentStorage 1.2.840.10008.5.1.4.1.1.88.70 AcquisitionContextSRStorage 1.2.840.10008.5.1.4.1.1.88.71 SimplifiedAdultEchoSRStorage 1.2.840.10008.5.1.4.1.1.88.72 +PatientRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.73 ContentAssessmentResultsStorage 1.2.840.10008.5.1.4.1.1.90.1 EncapsulatedPDFStorage 1.2.840.10008.5.1.4.1.1.104.1 EncapsulatedCDAStorage 1.2.840.10008.5.1.4.1.1.104.2 @@ -675,7 +699,6 @@ LegacyConvertedEnhancedPETImageStorage 1.2.840.10008.5.1.4.1.1.128 RETIRED_StandalonePETCurveStorage 1.2.840.10008.5.1.4.1.1.129 EnhancedPETImageStorage 1.2.840.10008.5.1.4.1.1.130 BasicStructuredDisplayStorage 1.2.840.10008.5.1.4.1.1.131 -CTDefinedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.1 CTPerformedProcedureProtocolStorage 1.2.840.10008.5.1.4.1.1.200.2 RTImageStorage 1.2.840.10008.5.1.4.1.1.481.1 RTDoseStorage 1.2.840.10008.5.1.4.1.1.481.2 diff --git a/dcmnet/docs/storescu.man b/dcmnet/docs/storescu.man index 6fcfdd07..218f83c7 100644 --- a/dcmnet/docs/storescu.man +++ b/dcmnet/docs/storescu.man @@ -172,6 +172,12 @@ proposed transmission transfer syntaxes (not with --config-file): -xo --propose-mpeg4-2-st propose MPEG4 AVC/H.264 Stereo HP / Level 4.2 TS only + -x4 --propose-hevc + propose HEVC H.265 Main Profile / Level 5.1 TS only + + -x5 --propose-hevc10 + propose HEVC H.265 Main 10 Profile / Level 5.1 TS only + -xr --propose-rle propose RLE lossless TS and all uncompressed transfer syntaxes @@ -454,6 +460,8 @@ MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax 1.2.840.10008.1.2.4.103 MPEG4HighProfileLevel4_2_For2DVideoTransferSyntax 1.2.840.10008.1.2.4.104 MPEG4HighProfileLevel4_2_For3DVideoTransferSyntax 1.2.840.10008.1.2.4.105 MPEG4StereoHighProfileLevel4_2TransferSyntax 1.2.840.10008.1.2.4.106 +HEVCMainProfileLevel5_1TransferSyntax 1.2.840.10008.1.2.4.107 +HEVCMain10ProfileLevel5_1TransferSyntax 1.2.840.10008.1.2.4.108 RLELosslessTransferSyntax 1.2.840.10008.1.2.5 \endverbatim diff --git a/dcmnet/etc/CMakeLists.txt b/dcmnet/etc/CMakeLists.txt index 24a55806..63b46caf 100644 --- a/dcmnet/etc/CMakeLists.txt +++ b/dcmnet/etc/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(FILES storescp.cfg storescu.cfg DESTINATION ${DCMTK_INSTALL_ETCDIR} COMPONENT etc) +INSTALL(FILES storescp.cfg storescu.cfg DESTINATION "${DCMTK_INSTALL_ETCDIR}" COMPONENT etc) diff --git a/dcmnet/etc/storescp.cfg b/dcmnet/etc/storescp.cfg index ad6cea6d..db537d84 100644 --- a/dcmnet/etc/storescp.cfg +++ b/dcmnet/etc/storescp.cfg @@ -204,6 +204,7 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib # the following SOP classes are missing in the above list: # # - AcquisitionContextSRStorage +# - AdvancedBlendingPresentationStateStorage # - BreastProjectionXRayImageStorageForPresentation # - BreastProjectionXRayImageStorageForProcessing # - ColorPaletteStorage @@ -217,11 +218,17 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib # - LegacyConvertedEnhancedCTImageStorage # - LegacyConvertedEnhancedMRImageStorage # - LegacyConvertedEnhancedPETImageStorage +# - MultipleVolumeRenderingVolumetricPresentationStateStorage +# - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage +# - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage # - ParametricMapStorage +# - PatientRadiationDoseSRStorage # - RadiopharmaceuticalRadiationDoseSRStorage # - RTBrachyApplicationSetupDeliveryInstructionStorage +# - SegmentedVolumeRenderingVolumetricPresentationStateStorage # - SimplifiedAdultEchoSRStorage # - TractographyResultsStorage +# - VolumeRenderingVolumetricPresentationStateStorage # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage # @@ -241,8 +248,8 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib [AllDICOMStorageSCP] # # Same as "GenericStorageSCP" but limited to non-retired and non-draft SOP Classes. -# This allows for accepting all DICOM Storage SOP Classes that are currently defined -# in the standard (an exception is made for some non-patient DICOM objects because +# This allows for accepting (almost) all DICOM Storage SOP Classes that are currently +# defined in the standard (an exception is made for some very new DICOM objects because # of the limitation of 128 Presentation Contexts for SCPs, see DCMTK Feature # 540). # PresentationContext1 = VerificationSOPClass\Uncompressed @@ -382,7 +389,14 @@ PresentationContext128 = XRayRadiationDoseSRStorage\UncompressedOrZlib # # the following SOP classes are missing in the above list: # +# - AdvancedBlendingPresentationStateStorage # - ColorPaletteStorage +# - MultipleVolumeRenderingVolumetricPresentationStateStorage +# - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage +# - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage +# - PatientRadiationDoseSRStorage +# - SegmentedVolumeRenderingVolumetricPresentationStateStorage +# - VolumeRenderingVolumetricPresentationStateStorage # # - RETIRED_HardcopyColorImageStorage # - RETIRED_HardcopyGrayscaleImageStorage diff --git a/dcmnet/etc/storescu.cfg b/dcmnet/etc/storescu.cfg index a42412fe..929a7936 100644 --- a/dcmnet/etc/storescu.cfg +++ b/dcmnet/etc/storescu.cfg @@ -1,5 +1,5 @@ # -# Copyright (C) 2003-2016, OFFIS e.V. +# Copyright (C) 2003-2017, OFFIS e.V. # All rights reserved. See COPYRIGHT file for details. # # This software and supporting documentation were developed by @@ -200,6 +200,7 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2 # the following SOP classes are missing in the above list: # # - AcquisitionContextSRStorage +# - AdvancedBlendingPresentationStateStorage # - ArterialPulseWaveformStorage # - AutorefractionMeasurementsStorage # - BasicStructuredDisplayStorage @@ -234,11 +235,15 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2 # - LegacyConvertedEnhancedPETImageStorage # - LensometryMeasurementsStorage # - MacularGridThicknessAndVolumeReportStorage +# - MultipleVolumeRenderingVolumetricPresentationStateStorage # - OphthalmicAxialMeasurementsStorage +# - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage +# - OphthalmicOpticalCoherenceTomographyEnFaceImageStorage # - OphthalmicThicknessMapStorage # - OphthalmicTomographyImageStorage # - OphthalmicVisualFieldStaticPerimetryMeasurementsStorage # - ParametricMapStorage +# - PatientRadiationDoseSRStorage # - RadiopharmaceuticalRadiationDoseSRStorage # - RealWorldValueMappingStorage # - RespiratoryWaveformStorage @@ -247,6 +252,7 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2 # - RTIonBeamsTreatmentRecordStorage # - RTIonPlanStorage # - SegmentationStorage +# - SegmentedVolumeRenderingVolumetricPresentationStateStorage # - SimplifiedAdultEchoSRStorage # - SpectaclePrescriptionReportStorage # - SubjectiveRefractionMeasurementsStorage @@ -256,6 +262,7 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2 # - TractographyResultsStorage # - VisualAcuityMeasurementsStorage # - VLWholeSlideMicroscopyImageStorage +# - VolumeRenderingVolumetricPresentationStateStorage # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage # - XAXRFGrayscaleSoftcopyPresentationStateStorage diff --git a/dcmnet/include/CMakeLists.txt b/dcmnet/include/CMakeLists.txt index d9b5076a..806843cd 100644 --- a/dcmnet/include/CMakeLists.txt +++ b/dcmnet/include/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -INSTALL(DIRECTORY dcmtk/dcmnet DESTINATION ${DCMTK_INSTALL_INCDIR}/dcmtk COMPONENT include FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY dcmtk/dcmnet DESTINATION "${DCMTK_INSTALL_INCDIR}/dcmtk" COMPONENT include FILES_MATCHING PATTERN "*.h") diff --git a/dcmnet/include/dcmtk/dcmnet/assoc.h b/dcmnet/include/dcmtk/dcmnet/assoc.h index ab6c453f..78f003c9 100644 --- a/dcmnet/include/dcmtk/dcmnet/assoc.h +++ b/dcmnet/include/dcmtk/dcmnet/assoc.h @@ -365,7 +365,8 @@ ASC_acceptPresentationContext( T_ASC_Parameters * params, T_ASC_PresentationContextID presentationContextID, const char* transferSyntax, - T_ASC_SC_ROLE acceptedRole = ASC_SC_ROLE_DEFAULT); + T_ASC_SC_ROLE acceptedRole = ASC_SC_ROLE_DEFAULT, + const OFBool alwaysAcceptDefaultRole = OFFalse); DCMTK_DCMNET_EXPORT OFCondition ASC_acceptContextsWithPreferredTransferSyntaxes( @@ -640,7 +641,14 @@ ASC_dumpConnectionParameters(T_ASC_Association *association, STD_NAMESPACE ostre @return The role as a string */ DCMTK_DCMNET_EXPORT const char* -ASC_role2String(T_ASC_SC_ROLE role); +ASC_role2String(const T_ASC_SC_ROLE role); + +/** Converts given ASC role to DUL role + * @param role The role to convert + @return The role as DUL role + */ +DCMTK_DCMNET_EXPORT DUL_SC_ROLE +ascRole2dulRole(const T_ASC_SC_ROLE role); #endif diff --git a/dcmnet/include/dcmtk/dcmnet/cond.h b/dcmnet/include/dcmtk/dcmnet/cond.h index 11a3c124..3c46947d 100644 --- a/dcmnet/include/dcmtk/dcmnet/cond.h +++ b/dcmnet/include/dcmtk/dcmnet/cond.h @@ -152,6 +152,7 @@ const unsigned short DULC_TCPWRAPPER = 0x324; const unsigned short DULC_FORKEDCHILD = 0x325; const unsigned short DULC_CANNOTFORK = 0x326; const unsigned short DULC_ILLEGALREJECTSOURCE = 0x327; +const unsigned short DULC_CANNOTREADSOCKETHANDLE = 0x328; // condition constants used in the DUL module extern DCMTK_DCMNET_EXPORT const OFConditionConst DUL_ASSOCIATIONREJECTED; /* DUL Association Rejected */ @@ -176,6 +177,7 @@ extern DCMTK_DCMNET_EXPORT const OFConditionConst DUL_REQUESTASSOCIATIONFAILED; extern DCMTK_DCMNET_EXPORT const OFConditionConst DUL_UNEXPECTEDPDU; /* Received unexpected PDU */ extern DCMTK_DCMNET_EXPORT const OFConditionConst DUL_UNSUPPORTEDPEERPROTOCOL; /* DUL Unsupported peer protocol */ extern DCMTK_DCMNET_EXPORT const OFConditionConst DUL_WRONGDATATYPE; /* DUL Wrong Data Type Specified for Request */ +extern DCMTK_DCMNET_EXPORT const OFConditionConst DUL_CANNOTREADSOCKETHANDLE; /* Cannot read socket handle from pipe */ // other condition constants used in the network module (codes 1000 to 1023) extern DCMTK_DCMNET_EXPORT const OFConditionConst NET_EC_InvalidSOPClassUID; /* Invalid SOP Class UID */ diff --git a/dcmnet/include/dcmtk/dcmnet/dcasccfg.h b/dcmnet/include/dcmtk/dcmnet/dcasccfg.h index a28891cd..c7bc419f 100644 --- a/dcmnet/include/dcmtk/dcmnet/dcasccfg.h +++ b/dcmnet/include/dcmtk/dcmnet/dcasccfg.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2015, OFFIS e.V. + * Copyright (C) 2003-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -128,6 +128,14 @@ public: const char *abstractSyntaxUID, T_ASC_SC_ROLE role); + /** adds empty role list, also returns ok if list is already existing. + * If key is not yet known, a new list is created under this key. + * @param key role list key, must not be NULL + * @return EC_Normal if successful, an error code otherwise + */ + OFCondition createEmptyRoleList( + const char *key); + /** adds the given abstract syntax UID and extended negotiation data to * the list of extended negotiation items maintained under the given key. * If key is not yet known, a new list is created under this key. @@ -193,6 +201,19 @@ public: */ OFString findTSKey(const OFList& tslist); + /** Option to always accept a default role as association acceptor. + * If OFFalse (default) the acceptor will reject a presentation context proposed + * with Default role (no role selection at all) when it is configured for role + * SCP only. If this option is set to OFTrue then such presentation contexts will + * be accepted in Default role (i.e. acceptor does not return role selection for + * this presentation context at all). Overall, if set to OFTrue, there are no + * requestor proposals possible that lead to a complete rejection of a presentation + * context. See also role documentation in dul.h. + * @param enabled If OFTrue, do not reject Default role proposals when configured + * for SCP role. OFFalse (default behaviour): Reject such proposals. + */ + void setAlwaysAcceptDefaultRole(const OFBool enabled); + /** dumps all profiles or a selected profile to the given output stream. * Mainly useful for debugging. * @param out output stream to be used @@ -230,6 +251,16 @@ private: /// map of profiles DcmProfileMap profiles_; + + /// Option to always accept a default role as association acceptor. + /// If OFFalse (default) the acceptor will reject a presentation context proposed + /// with Default role (no role selection at all) when it is configured for role + /// SCP only. If this option is set to OFTrue then such presentation contexts will + /// be accepted in Default role (i.e. acceptor does not return role selection for + /// this presentation context at all). Overall, if set to OFTrue, there are no + /// requestor proposals possible that lead to a complete rejection of a presentation + /// context. See also role documentation in dul.h. + OFBool alwaysAcceptDefaultRole_; }; #endif diff --git a/dcmnet/include/dcmtk/dcmnet/dccfrsmp.h b/dcmnet/include/dcmtk/dcmnet/dccfrsmp.h index 4696bde6..0db7eb50 100644 --- a/dcmnet/include/dcmtk/dcmnet/dccfrsmp.h +++ b/dcmnet/include/dcmtk/dcmnet/dccfrsmp.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2011, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -141,6 +141,15 @@ public: const char *abstractSyntaxUID, T_ASC_SC_ROLE role); + /** add empty list within map. + * If key is new, new list is created. Otherwise the request + * is ignored (no error). + * @param key map key + * @return EC_Normal if successful, an error code otherwise + */ + OFCondition addEmpty( + const char *key); + /** checks if the key is known * @param key key name, must not be NULL * @return true if key is known, false otherwise diff --git a/dcmnet/include/dcmtk/dcmnet/dcmlayer.h b/dcmnet/include/dcmtk/dcmnet/dcmlayer.h index c446a8bd..e6591e1d 100644 --- a/dcmnet/include/dcmtk/dcmnet/dcmlayer.h +++ b/dcmnet/include/dcmtk/dcmnet/dcmlayer.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2011, OFFIS e.V. + * Copyright (C) 1998-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -24,6 +24,7 @@ #define DCMLAYER_H #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + #include "dcmtk/ofstd/oftypes.h" #include "dcmtk/ofstd/ofstring.h" @@ -31,6 +32,7 @@ #include "dcmtk/ofstd/ofstdinc.h" #include "dcmtk/dcmnet/dndefine.h" +#include "dcmtk/dcmnet/dntypes.h" /** this enum represents the result of a transport layer operation * which may be a transparent TCP/IP or a secure TLS operation. @@ -90,7 +92,7 @@ public: * transparent layer is used. * @return pointer to new connection object if successful, NULL otherwise. */ - virtual DcmTransportConnection *createConnection(int openSocket, OFBool useSecureLayer); + virtual DcmTransportConnection *createConnection(DcmNativeSocketType openSocket, OFBool useSecureLayer); private: diff --git a/dcmnet/include/dcmtk/dcmnet/dcmtrans.h b/dcmnet/include/dcmtk/dcmnet/dcmtrans.h index 97e9f100..75bdc55e 100644 --- a/dcmnet/include/dcmtk/dcmnet/dcmtrans.h +++ b/dcmnet/include/dcmtk/dcmnet/dcmtrans.h @@ -24,6 +24,7 @@ #define DCMTRANS_H #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + #include "dcmtk/ofstd/ofglobal.h" /* for OFGlobal */ #include "dcmtk/ofstd/oftypes.h" /* for OFBool */ #include "dcmtk/ofstd/ofstream.h" /* for ostream */ @@ -65,7 +66,7 @@ public: * the connection must already be established on socket level. This object * takes over control of the socket. */ - DcmTransportConnection(int openSocket); + DcmTransportConnection(DcmNativeSocketType openSocket); /** destructor */ @@ -183,12 +184,12 @@ protected: /** returns the socket file descriptor managed by this object. * @return socket file descriptor */ - int getSocket() { return theSocket; } + DcmNativeSocketType getSocket() { return theSocket; } /** set the socket file descriptor managed by this object. * @param socket file descriptor */ - void setSocket(int socket) { theSocket = socket; } + void setSocket(DcmNativeSocketType socket) { theSocket = socket; } private: @@ -234,8 +235,8 @@ private: */ static OFBool fastSelectReadableAssociation(DcmTransportConnection *connections[], int connCount, int timeout); - /// the socket file descriptor used by the transport connection. - int theSocket; + /// the socket file descriptor/handle used by the transport connection. + DcmNativeSocketType theSocket; }; @@ -250,7 +251,7 @@ public: * the connection must already be established on socket level. This object * takes over control of the socket. */ - DcmTCPConnection(int openSocket); + DcmTCPConnection(DcmNativeSocketType openSocket); /** destructor */ diff --git a/dcmnet/include/dcmtk/dcmnet/dcompat.h b/dcmnet/include/dcmtk/dcmnet/dcompat.h index 87a1667a..e9112be5 100644 --- a/dcmnet/include/dcmtk/dcmnet/dcompat.h +++ b/dcmnet/include/dcmtk/dcmnet/dcompat.h @@ -91,25 +91,11 @@ #define INCLUDE_UNISTD #include "dcmtk/ofstd/ofstdinc.h" -#ifdef HAVE_GUSI_H -/* Use the Grand Unified Sockets Interface (GUSI) on Macintosh */ -#include -#endif - #ifdef HAVE_WINDOWS_H -#include /* this includes either winsock.h or winsock2.h */ -#else -#ifdef HAVE_WINSOCK_H +#define WIN32_LEAN_AND_MEAN +#include /* for Windows defines */ +#elif defined(HAVE_WINSOCK_H) #include /* include winsock.h directly i.e. on MacOS */ -#ifdef macintosh -/* -** The WinSock header on Macintosh does not declare the WORD type nor the MAKEWORD -** macro need to initialize the WinSock library. -*/ -typedef u_short WORD; -#define MAKEWORD(a,b) ((WORD) (((a)&0xff)<<8) | ((b)&0xff) ) -#endif -#endif #endif BEGIN_EXTERN_C @@ -169,7 +155,6 @@ END_EXTERN_C #ifdef HAVE_PROTOTYPE_FLOCK #define dcmtk_flock flock -#define dcmtk_plockerr perror #endif #ifndef HAVE_PROTOTYPE_FLOCK @@ -178,7 +163,6 @@ BEGIN_EXTERN_C DCMTK_DCMNET_EXPORT int flock(int fd, int operation); END_EXTERN_C #define dcmtk_flock flock -#define dcmtk_plockerr perror #else /* * Simulate the flock function calls @@ -191,7 +175,6 @@ END_EXTERN_C #define LOCK_UN 8 /* unlock */ DCMTK_DCMNET_EXPORT int dcmtk_flock(int fd, int operation); -DCMTK_DCMNET_EXPORT void dcmtk_plockerr(const char *s); #endif /* !HAVE_FLOCK */ #endif @@ -360,15 +343,12 @@ DCMTK_DCMNET_EXPORT int access(const char* path, int amode); #endif /* HAVE_ACCESS */ -#ifndef HAVE_STRERROR -DCMTK_DCMNET_EXPORT char *strerror(int e); -#endif - #ifdef _WIN32 #define NULL_DEVICE_NAME "nul" #else #define NULL_DEVICE_NAME "/dev/null" #endif +DCMTK_DCMNET_EXPORT void dcmtk_plockerr(const char *s); #endif /* DCOMPAT_H */ diff --git a/dcmnet/include/dcmtk/dcmnet/dntypes.h b/dcmnet/include/dcmtk/dcmnet/dntypes.h new file mode 100644 index 00000000..c6a4eec4 --- /dev/null +++ b/dcmnet/include/dcmtk/dcmnet/dntypes.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (C) 2017, OFFIS e.V. + * All rights reserved. See COPYRIGHT file for details. + * + * This software and supporting documentation were developed by + * + * OFFIS e.V. + * R&D Division Health + * Escherweg 2 + * D-26121 Oldenburg, Germany + * + * + * Module: dcmnet + * + * Author: Jan Schlamelcher + * + * Purpose: global type and constant definitions + * + */ + +#ifndef DNTYPES_H +#define DNTYPES_H + +#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ +#include "dcmtk/ofstd/oftypes.h" +#include "dcmtk/dcmnet/dndefine.h" + +#ifdef _WIN32 +typedef OFuintptr_t DcmNativeSocketType; +#define DCMNET_INVALID_SOCKET INVALID_SOCKET +#elif !defined(DOXYGEN) +typedef int DcmNativeSocketType; +#define DCMNET_INVALID_SOCKET -1 +#else +/// The data type for representing a TCP socket that is used by the underlying network API. +typedef /* unspecified */ DcmNativeSocketType; +#endif + +#endif /* !DNTYPES_H */ diff --git a/dcmnet/include/dcmtk/dcmnet/dul.h b/dcmnet/include/dcmtk/dcmnet/dul.h index 3272de7f..3f1ea79e 100644 --- a/dcmnet/include/dcmtk/dcmnet/dul.h +++ b/dcmnet/include/dcmtk/dcmnet/dul.h @@ -71,6 +71,7 @@ #include "dcmtk/dcmnet/extneg.h" #include "dcmtk/dcmnet/dicom.h" #include "dcmtk/dcmnet/dcuserid.h" +#include "dcmtk/dcmnet/dntypes.h" class DcmTransportConnection; class DcmTransportLayer; @@ -84,13 +85,6 @@ class LST_HEAD; */ extern DCMTK_DCMNET_EXPORT OFGlobal dcmDisableGethostbyaddr; /* default: OFFalse */ -/** Global flag specifying whether to reject presentation contexts in case of an - * unsuccessful SCP/SCU role selection (strict) or to return the corresponding - * user data item with appropriate values (default). This applies to association - * acceptors only. - */ -extern DCMTK_DCMNET_EXPORT OFGlobal dcmStrictRoleSelection; /* default: OFFalse */ - /** Global timeout in seconds for connecting to remote hosts. * Default value is -1, which selects infinite timeout, i.e. blocking connect(). */ @@ -100,7 +94,7 @@ extern DCMTK_DCMNET_EXPORT OFGlobal dcmConnectionTimeout; /* default: * will be used by dcmnet the next time receiveTransportConnectionTCP() is called. * Useful for use with proxy applications, but inherently thread unsafe! */ -extern DCMTK_DCMNET_EXPORT OFGlobal dcmExternalSocketHandle; /* default: -1 */ +extern DCMTK_DCMNET_EXPORT OFGlobal dcmExternalSocketHandle; /* default: platform specific value that denotes invalid */ /** When compiled with WITH_TCPWRAPPER, DCMTK server processes may use the TCP * wrapper library to enforce access control - see hosts_access(5). If this @@ -189,6 +183,48 @@ typedef struct { OFBool useSecureLayer; } DUL_ASSOCIATESERVICEPARAMETERS; +/** Enum describing the possible role settings for role negotiation sub items. + * DCMTK implements the following role negotiation behaviour for association + * acceptors: + * @verbatim + * +--------------------+------------------+---------+ + * | Requestor Proposal | Acceptor Setting | Result | + * +--------------------+------------------+---------+ + * | SCU | SCP | NONE | + * | SCU | SCU | SCU | + * | SCU | SCU/SCP | SCU | + * | SCU | DEFAULT | DEFAULT | + * | SCP | SCP | SCP | + * | SCP | SCU | NONE | + * | SCP | SCU/SCP | SCP | + * | SCP | DEFAULT | DEFAULT | + * | SCU/SCP | SCP | SCP | + * | SCU/SCP | SCU | SCU | + * | SCU/SCP | SCU/SCP | SCU/SCP | + * | SCU/SCP | DEFAULT | DEFAULT | + * | DEFAULT | SCP | Reject | + * | DEFAULT | SCU | DEFAULT | + * | DEFAULT | SCU/SCP | DEFAULT | + * | DEFAULT | DEFAULT | DEFAULT | + * +--------------------+------------------+---------+ + * @endverbatim + * NONE, SCU, SCP as well as SCU/SCP denote the related flags in the + * association role selection user items. The "Reject" case denotes that + * such a presentation context will be rejected by the association acceptor: + * If the requestor connects with default role but the acceptor explicitly + * requires the SCP role (only) then the presentation context + * will be rejected. All other cases do not lead to rejection but to actual + * "negotiation". + * + * The Reject case can be avoided by setting a related option available in + * association acceptance code like ASC_acceptPresentationContext() or DcmSCP. + * to OFTrue (reading something like "alwaysAcceptDefaultRole" since when enabled, + * with the Reject being disabled all Default role proposals will be accepted). + * This can make sense for faulty Requestors, e.g. faulty Storage Commitment Servers + * connecting on a second connection for delivering an N-EVENT-REPORT, or broken + * Retrieve requestors proposing GET-based SOP Classes for retrieval using the Default + * role instead of the required SCP role. + */ typedef enum { DUL_SC_ROLE_NONE, DUL_SC_ROLE_DEFAULT, @@ -348,7 +384,7 @@ typedef enum { */ #define DUL_DULCOMPAT 2768240730UL -#define DUL_DIMSECOMPAT 655360UL +#define DUL_DIMSECOMPAT 786432UL #define DUL_MAXPDUCOMPAT 4278190335UL /* Define the function prototypes for this facility. @@ -439,8 +475,9 @@ DCMTK_DCMNET_EXPORT OFString& dumpExtNegList(OFString& str, SOPClassExtendedNego DCMTK_DCMNET_EXPORT OFBool DUL_dataWaiting(DUL_ASSOCIATIONKEY * callerAssociation, int timeout); -DCMTK_DCMNET_EXPORT int -DUL_networkSocket(DUL_NETWORKKEY * callerNet); + +DCMTK_DCMNET_EXPORT DcmNativeSocketType DUL_networkSocket(DUL_NETWORKKEY * callerNet); + DCMTK_DCMNET_EXPORT OFBool DUL_associationWaiting(DUL_NETWORKKEY * callerNet, int timeout); @@ -483,6 +520,15 @@ DCMTK_DCMNET_EXPORT OFBool DUL_processIsForkedChild(); */ DCMTK_DCMNET_EXPORT void DUL_markProcessAsForkedChild(); +/** this helper function calls DUL_markProcessAsForkedChild(), then reads + * the socket handle from the pipe opened by the parent process and + * stores it in the global variable dcmExternalSocketHandle. This is + * in most cases everything needed to prepare the network layer to act + * as a forked child on Win32. On other operating system, the function does nothing. + * @return EC_Normal if successful, an error code otherwise. + */ +DCMTK_DCMNET_EXPORT OFCondition DUL_readSocketHandleAsForkedChild(); + /** this function marks the current process as a multi-process server and enables * the creation of child processes for each incoming TCP transport connection * in receiveTransportConnectionTCP(). diff --git a/dcmnet/include/dcmtk/dcmnet/scp.h b/dcmnet/include/dcmtk/dcmnet/scp.h index d0018bf3..224163b6 100644 --- a/dcmnet/include/dcmtk/dcmnet/scp.h +++ b/dcmnet/include/dcmtk/dcmnet/scp.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2009-2016, OFFIS e.V. + * Copyright (C) 2009-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -170,7 +170,16 @@ public: * @param abstractSyntax [in] The UID of the abstract syntax (e.g.\ SOP class) to add * @param xferSyntaxes [in] List of transfer syntaxes (UIDs) that should be supported * for the given abstract syntax name - * @param role [in] The role to be negotiated + * @param requestorRole [in] The role to be negotiated. This denotes the role of the + * the association requestor that this instance should accept, i.e. if + * set to ASC_SC_ROLE_SCP it means that the association requestor + * is allowed to negotiate the SCP role, thus, that this DcmSCP instance + * will be playing the SCU role for this abstract syntax. The default + * role (ASC_SC_ROLE_DEFAULT) implicates that this DcmSCP instance + * will be allowed to play the SCP role only, i.e. it will acknowledge + * such an explicit SCU role request, but also it will accept a proposal + * for the abstract syntax with no explicit role being proposed + * at all (since per default the requestor is SCU and the acceptor SCP). * @param profile [in] The profile the abstract syntax should be added to. The * default is to add it to the DcmSCP's internal standard * profile called "DEFAULT". @@ -178,7 +187,7 @@ public: */ virtual OFCondition addPresentationContext(const OFString &abstractSyntax, const OFList &xferSyntaxes, - const T_ASC_SC_ROLE role = ASC_SC_ROLE_DEFAULT, + const T_ASC_SC_ROLE requestorRole = ASC_SC_ROLE_DEFAULT, const OFString &profile = "DEFAULT"); /** Set SCP's TCP/IP listening port @@ -290,6 +299,19 @@ public: */ void setProgressNotificationMode(const OFBool mode); + /** Option to always accept a default role as association acceptor. + * If OFFalse (default) the acceptor will reject a presentation context proposed + * with Default role (no role selection at all) when it is configured for role + * SCP only. If this option is set to OFTrue then such presentation contexts will + * be accepted in Default role (i.e. acceptor does not return role selection for + * this presentation context at all). Overall, if set to OFTrue, there are no + * requestor proposals possible that lead to a complete rejection of a presentation + * context. See also role documentation in dul.h. + * @param enabled If OFTrue, do not reject Default role proposals when configured + * for SCP role. OFFalse (default behaviour): Reject such proposals. + */ + void setAlwaysAcceptDefaultRole(const OFBool enabled); + /* Get methods for SCP settings */ /** Returns TCP/IP port number SCP listens for new connection requests diff --git a/dcmnet/include/dcmtk/dcmnet/scpcfg.h b/dcmnet/include/dcmtk/dcmnet/scpcfg.h index 8ab72b41..972ca0e1 100644 --- a/dcmnet/include/dcmtk/dcmnet/scpcfg.h +++ b/dcmnet/include/dcmtk/dcmnet/scpcfg.h @@ -194,6 +194,19 @@ public: */ void setProgressNotificationMode(const OFBool mode); + /** Option to always accept a default role as association acceptor. + * If OFFalse (default) the acceptor will reject a presentation context proposed + * with Default role (no role selection at all) when it is configured for role + * SCP only. If this option is set to OFTrue then such presentation contexts will + * be accepted in Default role (i.e. acceptor does not return role selection for + * this presentation context at all). Overall, if set to OFTrue, there are no + * requestor proposals possible that lead to a complete rejection of a presentation + * context. See also role documentation in dul.h. + * @param enabled If OFTrue, do not reject Default role proposals when configured + * for SCP role. OFFalse (default behaviour): Reject such proposals. + */ + void setAlwaysAcceptDefaultRole(const OFBool enabled); + /* Get methods for SCP settings */ /** Returns TCP/IP port number SCP listens for new connection requests diff --git a/dcmnet/include/dcmtk/dcmnet/scu.h b/dcmnet/include/dcmtk/dcmnet/scu.h index 20900519..26d8ff55 100644 --- a/dcmnet/include/dcmtk/dcmnet/scu.h +++ b/dcmnet/include/dcmtk/dcmnet/scu.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2008-2015, OFFIS e.V. + * Copyright (C) 2008-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -233,10 +233,13 @@ public: * @param abstractSyntax [in] The abstract syntax (UID) to look for * @param transferSyntax [in] The transfer syntax (UID) to look for. If empty, the transfer * syntax is not checked. + * @param requestorRole [in] The role to look for (denoting the role the association + * requestor plays) * @return Adequate Presentation context ID that can be used. 0 if none found. */ T_ASC_PresentationContextID findPresentationContextID(const OFString &abstractSyntax, - const OFString &transferSyntax); + const OFString &transferSyntax, + const T_ASC_SC_ROLE requestorRole = ASC_SC_ROLE_DEFAULT); /** After a successful association negotiation, this function is called to return the * presentation context ID that best matches the desired abstract syntax and transfer @@ -245,6 +248,7 @@ public: * - Else then tries to find an explicit VR uncompressed TS presentation context * - Else then tries to find an implicit VR uncompressed TS presentation context * - Else finally accepts each matching presentation ctx independent of TS. + * @warning This method does not support filtering for a specific role, yet. * @param abstractSyntax [in] The abstract syntax (UID) to look for * @param transferSyntax [in] The transfer syntax (UID) to look for. If empty, the transfer * syntax is not checked. diff --git a/dcmnet/libsrc/Makefile.dep b/dcmnet/libsrc/Makefile.dep index c91f5561..4ba4bbb3 100644 --- a/dcmnet/libsrc/Makefile.dep +++ b/dcmnet/libsrc/Makefile.dep @@ -27,7 +27,10 @@ assoc.o: assoc.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -43,14 +46,14 @@ assoc.o: assoc.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/diutil.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/diutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -109,7 +112,10 @@ dcasccff.o: dcasccff.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -125,17 +131,15 @@ dcasccff.o: dcasccff.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/dccftsmp.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dccftsmp.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ ../include/dcmtk/dcmnet/dccfprmp.h \ @@ -171,7 +175,10 @@ dcasccfg.o: dcasccfg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -187,17 +194,15 @@ dcasccfg.o: dcasccfg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/dccftsmp.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dccftsmp.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ ../include/dcmtk/dcmnet/dccfprmp.h @@ -292,7 +297,7 @@ dccfrsmp.o: dccfrsmp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -309,11 +314,12 @@ dccfrsmp.o: dccfrsmp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/dccfpcmp.h + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dccfpcmp.h dccftsmp.o: dccftsmp.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dccftsmp.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ @@ -357,7 +363,10 @@ dccfuidh.o: dccfuidh.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -375,10 +384,10 @@ dccfuidh.o: dccfuidh.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h dcmlayer.o: dcmlayer.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -390,7 +399,8 @@ dcmlayer.o: dcmlayer.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ - ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcmtrans.h \ + ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/dcmtrans.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -405,7 +415,7 @@ dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstream.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/dndefine.h \ - ../include/dcmtk/dcmnet/dcompat.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dcompat.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \ ../include/dcmtk/dcmnet/cond.h \ @@ -425,7 +435,10 @@ dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -441,9 +454,9 @@ dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -457,7 +470,8 @@ dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \ + ../../ofstd/include/dcmtk/ofstd/oftimer.h dcompat.o: dcompat.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dcompat.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \ @@ -487,7 +501,10 @@ dcompat.o: dcompat.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -503,9 +520,9 @@ dcompat.o: dcompat.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/diutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ @@ -521,7 +538,8 @@ dcompat.o: dcompat.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h dcuserid.o: dcuserid.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dcuserid.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -555,7 +573,10 @@ dcuserid.o: dcuserid.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -570,10 +591,11 @@ dcuserid.o: dcuserid.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcuid.h dulstruc.h + ../../ofstd/include/dcmtk/ofstd/oferror.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ + ../include/dcmtk/dcmnet/dntypes.h dulstruc.h dfindscu.o: dfindscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dfindscu.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ @@ -597,7 +619,10 @@ dfindscu.o: dfindscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -615,9 +640,9 @@ dfindscu.o: dfindscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ @@ -629,7 +654,7 @@ dfindscu.o: dfindscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/assoc.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -675,7 +700,10 @@ dimcancl.o: dimcancl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -691,9 +719,9 @@ dimcancl.o: dimcancl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -708,7 +736,8 @@ dimcancl.o: dimcancl.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h dimcmd.o: dimcmd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ @@ -726,6 +755,7 @@ dimcmd.o: dimcmd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ ../../oflog/include/dcmtk/oflog/logger.h \ @@ -738,7 +768,9 @@ dimcmd.o: dimcmd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -773,8 +805,8 @@ dimcmd.o: dimcmd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \ - dimcmd.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h dimcmd.h dimdump.o: dimdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \ @@ -804,7 +836,10 @@ dimdump.o: dimdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -820,9 +855,9 @@ dimdump.o: dimdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -837,7 +872,8 @@ dimdump.o: dimdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h dimecho.o: dimecho.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \ @@ -867,7 +903,10 @@ dimecho.o: dimecho.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -883,9 +922,9 @@ dimecho.o: dimecho.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -900,7 +939,8 @@ dimecho.o: dimecho.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h dimfind.o: dimfind.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \ @@ -930,7 +970,10 @@ dimfind.o: dimfind.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -946,9 +989,9 @@ dimfind.o: dimfind.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -963,7 +1006,8 @@ dimfind.o: dimfind.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h dimget.o: dimget.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \ @@ -993,7 +1037,10 @@ dimget.o: dimget.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1009,9 +1056,9 @@ dimget.o: dimget.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -1026,7 +1073,8 @@ dimget.o: dimget.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h dimmove.o: dimmove.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../../ofstd/include/dcmtk/ofstd/oftimer.h \ @@ -1057,7 +1105,10 @@ dimmove.o: dimmove.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1073,9 +1124,9 @@ dimmove.o: dimmove.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -1090,7 +1141,8 @@ dimmove.o: dimmove.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h dimse.o: dimse.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \ @@ -1120,7 +1172,10 @@ dimse.o: dimse.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1136,9 +1191,9 @@ dimse.o: dimse.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -1153,8 +1208,9 @@ dimse.o: dimse.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \ - dimcmd.h ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h dimcmd.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ @@ -1205,7 +1261,10 @@ dimstore.o: dimstore.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1221,9 +1280,9 @@ dimstore.o: dimstore.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -1238,7 +1297,8 @@ dimstore.o: dimstore.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \ + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcostrmf.h \ ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h diutil.o: diutil.cc ../../config/include/dcmtk/config/osconfig.h \ @@ -1255,6 +1315,7 @@ diutil.o: diutil.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \ ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ @@ -1275,7 +1336,9 @@ diutil.o: diutil.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1303,7 +1366,8 @@ diutil.o: diutil.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \ + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \ @@ -1331,7 +1395,10 @@ dstorscp.o: dstorscp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1349,10 +1416,10 @@ dstorscp.o: dstorscp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ @@ -1382,8 +1449,6 @@ dstorscp.o: dstorscp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -1430,13 +1495,13 @@ dstorscp.o: dstorscp.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dcompat.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \ - ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \ - ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \ - ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ - ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ - ../include/dcmtk/dcmnet/dccfprmp.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \ + ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \ + ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \ + ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \ + ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \ + ../include/dcmtk/dcmnet/diutil.h dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofdatime.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ @@ -1462,7 +1527,10 @@ dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1480,9 +1548,9 @@ dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \ @@ -1513,8 +1581,6 @@ dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -1559,11 +1625,12 @@ dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dcasccff.h \ - ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \ - ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ - ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ - ../include/dcmtk/dcmnet/dccfprmp.h ../include/dcmtk/dcmnet/diutil.h + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \ + ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \ + ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \ + ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \ + ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \ + ../include/dcmtk/dcmnet/diutil.h dul.o: dul.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ @@ -1593,7 +1660,10 @@ dul.o: dul.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1609,9 +1679,9 @@ dul.o: dul.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ @@ -1626,9 +1696,9 @@ dul.o: dul.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \ - dulstruc.h dulpriv.h dulfsm.h ../include/dcmtk/dcmnet/dcmtrans.h \ - ../include/dcmtk/dcmnet/dcmlayer.h \ + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h dulstruc.h dulpriv.h dulfsm.h \ + ../include/dcmtk/dcmnet/dcmtrans.h ../include/dcmtk/dcmnet/dcmlayer.h \ ../../ofstd/include/dcmtk/ofstd/ofnetdb.h dulconst.o: dulconst.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ @@ -1658,7 +1728,10 @@ dulconst.o: dulconst.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1674,9 +1747,9 @@ dulconst.o: dulconst.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/diutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ @@ -1692,8 +1765,8 @@ dulconst.o: dulconst.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \ - dulstruc.h dulpriv.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h dulstruc.h dulpriv.h dulextra.o: dulextra.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \ ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \ @@ -1722,7 +1795,10 @@ dulextra.o: dulextra.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1738,15 +1814,16 @@ dulextra.o: dulextra.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - dulstruc.h dulpriv.h ../include/dcmtk/dcmnet/dcmtrans.h \ - ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/diutil.h \ + ../include/dcmtk/dcmnet/dntypes.h dulstruc.h dulpriv.h \ + ../include/dcmtk/dcmnet/dcmtrans.h ../include/dcmtk/dcmnet/dcmlayer.h \ + ../include/dcmtk/dcmnet/diutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -1786,7 +1863,10 @@ dulfsm.o: dulfsm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1802,16 +1882,16 @@ dulfsm.o: dulfsm.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - dulstruc.h dulpriv.h dulfsm.h ../include/dcmtk/dcmnet/assoc.h \ - ../include/dcmtk/dcmnet/dcmtrans.h ../include/dcmtk/dcmnet/dcmlayer.h \ - ../include/dcmtk/dcmnet/diutil.h \ + ../include/dcmtk/dcmnet/dntypes.h dulstruc.h dulpriv.h dulfsm.h \ + ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dcmtrans.h \ + ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/diutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -1838,6 +1918,7 @@ dulparse.o: dulparse.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ @@ -1857,7 +1938,9 @@ dulparse.o: dulparse.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1875,7 +1958,7 @@ dulparse.o: dulparse.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/diutil.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/diutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \ @@ -1916,7 +1999,10 @@ dulpres.o: dulpres.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1932,14 +2018,14 @@ dulpres.o: dulpres.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - dulstruc.h dulpriv.h dulfsm.h + ../include/dcmtk/dcmnet/dntypes.h dulstruc.h dulpriv.h dulfsm.h extneg.o: extneg.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/extneg.h \ ../../ofstd/include/dcmtk/ofstd/ofstring.h \ @@ -1981,7 +2067,10 @@ scp.o: scp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -1999,10 +2088,10 @@ scp.o: scp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ @@ -2032,8 +2121,6 @@ scp.o: scp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -2080,13 +2167,13 @@ scp.o: scp.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dcompat.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \ - ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \ - ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \ - ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ - ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ - ../include/dcmtk/dcmnet/dccfprmp.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h \ + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \ + ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \ + ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \ + ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \ + ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \ + ../include/dcmtk/dcmnet/diutil.h \ ../../dcmdata/include/dcmtk/dcmdata/dcostrmf.h scpcfg.o: scpcfg.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \ @@ -2119,7 +2206,10 @@ scpcfg.o: scpcfg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2135,17 +2225,15 @@ scpcfg.o: scpcfg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oflist.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/dccftsmp.h \ + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dccftsmp.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ ../include/dcmtk/dcmnet/dccfprmp.h ../include/dcmtk/dcmnet/dimse.h \ @@ -2159,7 +2247,7 @@ scpcfg.o: scpcfg.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h + ../include/dcmtk/dcmnet/diutil.h scppool.o: scppool.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/scppool.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ @@ -2182,7 +2270,10 @@ scppool.o: scppool.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2199,10 +2290,10 @@ scppool.o: scppool.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ @@ -2232,8 +2323,6 @@ scppool.o: scppool.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -2280,13 +2369,13 @@ scppool.o: scppool.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dcompat.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \ - ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \ - ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \ - ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ - ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ - ../include/dcmtk/dcmnet/dccfprmp.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \ + ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \ + ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \ + ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \ + ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \ + ../include/dcmtk/dcmnet/diutil.h scpthrd.o: scpthrd.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/scpthrd.h ../include/dcmtk/dcmnet/scp.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -2307,7 +2396,10 @@ scpthrd.o: scpthrd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2325,10 +2417,10 @@ scpthrd.o: scpthrd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ @@ -2358,8 +2450,6 @@ scpthrd.o: scpthrd.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -2406,13 +2496,13 @@ scpthrd.o: scpthrd.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dcompat.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \ - ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \ - ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \ - ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ - ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ - ../include/dcmtk/dcmnet/dccfprmp.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \ + ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \ + ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \ + ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \ + ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \ + ../include/dcmtk/dcmnet/diutil.h scu.o: scu.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/scu.h ../../dcmdata/include/dcmtk/dcmdata/dctk.h \ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \ @@ -2434,7 +2524,10 @@ scu.o: scu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/oftraits.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -2452,10 +2545,10 @@ scu.o: scu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofthread.h \ ../../ofstd/include/dcmtk/ofstd/offile.h \ ../../ofstd/include/dcmtk/ofstd/ofstd.h \ - ../../ofstd/include/dcmtk/ofstd/oftraits.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \ @@ -2483,8 +2576,6 @@ scu.o: scu.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -2532,10 +2623,10 @@ scu.o: scu.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \ - ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dcasccff.h \ - ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \ - ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ - ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ - ../include/dcmtk/dcmnet/dccfprmp.h ../include/dcmtk/dcmnet/diutil.h \ - ../../dcmdata/include/dcmtk/dcmdata/dcostrmf.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h + ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \ + ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \ + ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \ + ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \ + ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \ + ../include/dcmtk/dcmnet/diutil.h \ + ../../dcmdata/include/dcmtk/dcmdata/dcostrmf.h diff --git a/dcmnet/libsrc/assoc.cc b/dcmnet/libsrc/assoc.cc index 8a3530e2..6d2c4789 100644 --- a/dcmnet/libsrc/assoc.cc +++ b/dcmnet/libsrc/assoc.cc @@ -90,6 +90,12 @@ */ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#ifdef HAVE_WINDOWS_H +// on Windows, we need Winsock2 for network functions +#include +#endif + #include "dcmtk/dcmnet/assoc.h" /* always include the module header */ #include "dcmtk/dcmnet/diutil.h" @@ -290,10 +296,15 @@ ASC_createAssociationParameters(T_ASC_Parameters ** params, OFFIS_DTK_IMPLEMENTATION_VERSION_NAME, sizeof((*params)->ourImplementationVersionName)-1); - strcpy((*params)->DULparams.callingImplementationClassUID, - (*params)->ourImplementationClassUID); - strcpy((*params)->DULparams.callingImplementationVersionName, - (*params)->ourImplementationVersionName); + if (strlen(OFFIS_DTK_IMPLEMENTATION_VERSION_NAME) > 16) + { + DCMNET_WARN("DICOM implementation version name too long: " << OFFIS_DTK_IMPLEMENTATION_VERSION_NAME); + } + + OFStandard::strlcpy((*params)->DULparams.callingImplementationClassUID, + (*params)->ourImplementationClassUID, DICOM_UI_LENGTH + 1); + OFStandard::strlcpy((*params)->DULparams.callingImplementationVersionName, + (*params)->ourImplementationVersionName, 16+1); strncpy((*params)->DULparams.applicationContextName, UID_StandardApplicationContext, @@ -567,8 +578,8 @@ dulRole2ascRole(DUL_SC_ROLE role) return ar; } -static DUL_SC_ROLE -ascRole2dulRole(T_ASC_SC_ROLE role) +DUL_SC_ROLE +ascRole2dulRole(const T_ASC_SC_ROLE role) { DUL_SC_ROLE dr = DUL_SC_ROLE_DEFAULT; switch (role) { @@ -583,7 +594,7 @@ ascRole2dulRole(T_ASC_SC_ROLE role) } const char* -ASC_role2String(T_ASC_SC_ROLE role) +ASC_role2String(const T_ASC_SC_ROLE role) { const char* s = NULL; switch (role) { @@ -843,7 +854,8 @@ ASC_acceptPresentationContext( T_ASC_Parameters * params, T_ASC_PresentationContextID presentationContextID, const char* transferSyntax, - T_ASC_SC_ROLE acceptedRole) + T_ASC_SC_ROLE acceptedRole, + const OFBool alwaysAcceptDefaultRole) /* * The presentation context will be marked as accepted and the provided * transfer syntax name chosen. @@ -863,22 +875,29 @@ ASC_acceptPresentationContext( proposedContext->result = ASC_P_ACCEPTANCE; proposedContext->acceptedSCRole = ascRole2dulRole(acceptedRole); - /* check whether the SCP/SCU role selection is successful */ - if (dcmStrictRoleSelection.get()) + /* Here we check the only role selection case which leads to clear rejection of the + * proposed presentation context: If the requestor connects with default role but the + * acceptor explicitly requires the SCP role (only) then the presentation context + * will be rejected. All other cases do not lead to rejection but to actual "negotiation". + * DCMTK's behaviour can be seen in the delaration of enum DUL_SC_ROLE (see dul.h). + * The logic of the role negotiation is implemented in constructSCUSCPRoles() (see dulconst.cc). + */ + if ( (proposedContext->proposedSCRole == DUL_SC_ROLE_DEFAULT) + && (proposedContext->acceptedSCRole == DUL_SC_ROLE_SCP) ) { - if (proposedContext->proposedSCRole != proposedContext->acceptedSCRole) - { - if (((proposedContext->proposedSCRole == DUL_SC_ROLE_DEFAULT) && (proposedContext->acceptedSCRole != DUL_SC_ROLE_SCU)) || - ((proposedContext->proposedSCRole == DUL_SC_ROLE_SCU) && (proposedContext->acceptedSCRole != DUL_SC_ROLE_DEFAULT)) || - ((proposedContext->proposedSCRole != DUL_SC_ROLE_SCUSCP) && (proposedContext->acceptedSCRole != DUL_SC_ROLE_SCUSCP))) - { - proposedContext->result = ASC_P_NOREASON; - DCMNET_ERROR("ASSOC: SCP/SCU role selection failed, proposed (" - << ASC_role2String(dulRole2ascRole(proposedContext->proposedSCRole)) - << ") and accepted role (" << ASC_role2String(acceptedRole) << ") are incompatible"); - return ASC_SCPSCUROLESELECTIONFAILED; - } - } + // If user wants to override rejection (e.g. for faulty clients), skip the check but print warning + if (alwaysAcceptDefaultRole) + { + DCMNET_WARN("ASSOC: Deliberately accepting Default role proposed by association requestor, " + << "while originally being configured for role SCP only"); + } + else + { + proposedContext->result = ASC_P_NOREASON; + DCMNET_ERROR("ASSOC: SCP/SCU role selection failed, Default role (i.e. SCU) proposed " + << "but only SCP role configured for acceptance"); + return ASC_SCPSCUROLESELECTIONFAILED; + } } acceptedContext = findPresentationContextID( @@ -1533,18 +1552,32 @@ ASC_dumpParameters(OFString& str, T_ASC_Parameters * params, ASC_associateType d << "Their Implementation Class UID: " << params->theirImplementationClassUID << OFendl << "Their Implementation Version Name: " - << params->theirImplementationVersionName << OFendl; - - outstream << "Application Context Name: " + << params->theirImplementationVersionName << OFendl + << "Application Context Name: " << params->DULparams.applicationContextName << OFendl << "Calling Application Name: " << params->DULparams.callingAPTitle << OFendl << "Called Application Name: " << params->DULparams.calledAPTitle << OFendl - << "Responding Application Name: " - << params->DULparams.respondingAPTitle << OFendl; + << "Responding Application Name: "; + + // the field "respondingAPTitle" in DULparams exists, + // but is never used for network communication because DICOM + // requires the responding AE title to be identical to the + // called AE title. This rule is enforced on the DUL layer + // but not visible here. + // To avoid confusion of the user we thus print the called + // AE title here (but only if respondingAPTitle is non-empty, + // which happens when an incoming association request is + // being responded to. + if (params->DULparams.respondingAPTitle[0] != '\0') + { + outstream << params->DULparams.calledAPTitle ; + } - outstream << "Our Max PDU Receive Size: " + outstream + << OFendl + << "Our Max PDU Receive Size: " << params->ourMaxPDUReceiveSize << OFendl << "Their Max PDU Receive Size: " << params->theirMaxPDUReceiveSize << OFendl; @@ -1595,8 +1628,9 @@ ASC_dumpParameters(OFString& str, T_ASC_Parameters * params, ASC_associateType d } #if 0 + // the following output could be useful for debugging purposes outstream << "DUL Params --- BEGIN" << OFendl; - DUL_DumpParams(¶ms->DULparams); + outstream << DUL_DumpParams(temp_str, ¶ms->DULparams); outstream << "DUL Params --- END" << OFendl; #endif @@ -1660,7 +1694,11 @@ ASC_dataWaiting(T_ASC_Association * association, int timeout) OFBool ASC_associationWaiting(T_ASC_Network * network, int timeout) { +#ifdef _WIN32 + SOCKET s; +#else int s; +#endif struct timeval t; fd_set fdset; int nfound; @@ -1668,8 +1706,13 @@ ASC_associationWaiting(T_ASC_Network * network, int timeout) if (network == NULL) return OFFalse; s = DUL_networkSocket(network->network); + +#ifdef _WIN32 + if (s == INVALID_SOCKET) return OFFalse; +#else if (s < 0) return OFFalse; +#endif FD_ZERO(&fdset); #ifdef __MINGW32__ @@ -1681,9 +1724,10 @@ ASC_associationWaiting(T_ASC_Network * network, int timeout) t.tv_sec = timeout; t.tv_usec = 0; #ifdef HAVE_INTP_SELECT - nfound = select(s + 1, (int *)(&fdset), NULL, NULL, &t); + nfound = select(OFstatic_cast(int, s + 1), (int *)(&fdset), NULL, NULL, &t); #else - nfound = select(s + 1, &fdset, NULL, NULL, &t); + // the typecast is safe because Windows ignores the first select() parameter anyway + nfound = select(OFstatic_cast(int, s + 1), &fdset, NULL, NULL, &t); #endif if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) { @@ -1904,10 +1948,10 @@ ASC_requestAssociation(T_ASC_Network * network, (*assoc)->sendPDVBuffer = NULL; params->DULparams.maxPDU = params->ourMaxPDUReceiveSize; - strcpy(params->DULparams.callingImplementationClassUID, - params->ourImplementationClassUID); - strcpy(params->DULparams.callingImplementationVersionName, - params->ourImplementationVersionName); + OFStandard::strlcpy(params->DULparams.callingImplementationClassUID, + params->ourImplementationClassUID, DICOM_UI_LENGTH + 1); + OFStandard::strlcpy(params->DULparams.callingImplementationVersionName, + params->ourImplementationVersionName, 16+1); cond = DUL_RequestAssociation(&network->network, block, timeout, &(*assoc)->params->DULparams, diff --git a/dcmnet/libsrc/cond.cc b/dcmnet/libsrc/cond.cc index 602b9910..7fb13a3a 100644 --- a/dcmnet/libsrc/cond.cc +++ b/dcmnet/libsrc/cond.cc @@ -71,6 +71,7 @@ makeOFConditionConst(DUL_REQUESTASSOCIATIONFAILED, OFM_dcmnet, DULC_REQUESTASSOC makeOFConditionConst(DUL_UNEXPECTEDPDU, OFM_dcmnet, DULC_UNEXPECTEDPDU , OF_error, "Received unexpected PDU"); makeOFConditionConst(DUL_UNSUPPORTEDPEERPROTOCOL, OFM_dcmnet, DULC_UNSUPPORTEDPEERPROTOCOL , OF_error, "DUL Unsupported peer protocol"); makeOFConditionConst(DUL_WRONGDATATYPE, OFM_dcmnet, DULC_WRONGDATATYPE , OF_error, "DUL Wrong Data Type Specified for Request"); +makeOFConditionConst(DUL_CANNOTREADSOCKETHANDLE, OFM_dcmnet, DULC_CANNOTREADSOCKETHANDLE , OF_error, "DUL Cannot Read Socket Handle from Pipe"); makeOFConditionConst(NET_EC_InvalidSOPClassUID, OFM_dcmnet, 1000, OF_error, "Invalid SOP Class UID"); makeOFConditionConst(NET_EC_UnknownStorageSOPClass, OFM_dcmnet, 1001, OF_error, "Unknown Storage SOP Class"); diff --git a/dcmnet/libsrc/dcasccfg.cc b/dcmnet/libsrc/dcasccfg.cc index 5ccc9e4d..8dbf5065 100644 --- a/dcmnet/libsrc/dcasccfg.cc +++ b/dcmnet/libsrc/dcasccfg.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2015, OFFIS e.V. + * Copyright (C) 2003-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -30,6 +30,7 @@ DcmAssociationConfiguration::DcmAssociationConfiguration() , roleselection_() , extneg_() , profiles_() +, alwaysAcceptDefaultRole_(OFFalse) { } @@ -70,6 +71,7 @@ void DcmAssociationConfiguration::clear() roleselection_.clear(); extneg_.clear(); profiles_.clear(); + alwaysAcceptDefaultRole_ = OFFalse; } OFCondition DcmAssociationConfiguration::addTransferSyntax( @@ -105,6 +107,12 @@ OFCondition DcmAssociationConfiguration::addRole( return roleselection_.add(key, abstractSyntaxUID, role); } +OFCondition DcmAssociationConfiguration::createEmptyRoleList( + const char* key) +{ + return roleselection_.addEmpty(key); +} + OFCondition DcmAssociationConfiguration::addExtendedNegotiation( const char *key, const char *abstractSyntaxUID, @@ -531,7 +539,7 @@ OFCondition DcmAssociationConfiguration::evaluateAssociationParameters( found = OFTrue; result = ASC_acceptPresentationContext( assoc.params, pc.presentationContextID, - pc.proposedTransferSyntaxes[j], acceptedRole); + pc.proposedTransferSyntaxes[j], acceptedRole, alwaysAcceptDefaultRole_); // SCP/SCU role selection failed, reject presentation context if (result == ASC_SCPSCUROLESELECTIONFAILED) { @@ -589,6 +597,12 @@ OFCondition DcmAssociationConfiguration::evaluateAssociationParameters( return result; } +void DcmAssociationConfiguration::setAlwaysAcceptDefaultRole(const OFBool enabled) +{ + alwaysAcceptDefaultRole_ = enabled; +} + + void DcmAssociationConfiguration::dumpProfiles( STD_NAMESPACE ostream &out, diff --git a/dcmnet/libsrc/dccfrsmp.cc b/dcmnet/libsrc/dccfrsmp.cc index 72032a47..f4730ea9 100644 --- a/dcmnet/libsrc/dccfrsmp.cc +++ b/dcmnet/libsrc/dccfrsmp.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2003-2010, OFFIS e.V. + * Copyright (C) 2003-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -154,6 +154,21 @@ OFCondition DcmRoleSelectionMap::add( return EC_Normal; } +OFCondition DcmRoleSelectionMap::addEmpty( + const char *key) +{ + if (!key) return EC_IllegalCall; + OFString skey(key); + OFMap::iterator it = map_.find(skey); + + if (it == map_.end()) + { + DcmRoleSelectionList *newentry = new DcmRoleSelectionList(); + map_.insert(OFPair(skey, newentry)); + } + return EC_Normal; +} + OFBool DcmRoleSelectionMap::isKnownKey(const char *key) const { if (!key) return OFFalse; diff --git a/dcmnet/libsrc/dcmlayer.cc b/dcmnet/libsrc/dcmlayer.cc index d83187cb..3ea7f676 100644 --- a/dcmnet/libsrc/dcmlayer.cc +++ b/dcmnet/libsrc/dcmlayer.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1998-2010, OFFIS e.V. + * Copyright (C) 1998-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -28,7 +28,7 @@ DcmTransportLayer::~DcmTransportLayer() { } -DcmTransportConnection * DcmTransportLayer::createConnection(int openSocket, OFBool useSecureLayer) +DcmTransportConnection * DcmTransportLayer::createConnection(DcmNativeSocketType openSocket, OFBool useSecureLayer) { if (useSecureLayer) return NULL; /* secure layer connections not supported */ else return new DcmTCPConnection(openSocket); diff --git a/dcmnet/libsrc/dcmtrans.cc b/dcmnet/libsrc/dcmtrans.cc index f81316ec..32eead6f 100644 --- a/dcmnet/libsrc/dcmtrans.cc +++ b/dcmnet/libsrc/dcmtrans.cc @@ -21,6 +21,12 @@ */ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#ifdef HAVE_WINDOWS_H +// on Windows, we need Winsock2 for network functions +#include +#endif + #include "dcmtk/dcmnet/dcmtrans.h" #include "dcmtk/dcmnet/dcompat.h" /* compatibility code for certain Unix dialects such as SunOS */ #include "dcmtk/dcmnet/diutil.h" @@ -32,6 +38,7 @@ #define INCLUDE_CERRNO #define INCLUDE_CSIGNAL #include "dcmtk/ofstd/ofstdinc.h" +#include "dcmtk/ofstd/oftimer.h" BEGIN_EXTERN_C #ifdef HAVE_SYS_TIME_H @@ -45,21 +52,22 @@ BEGIN_EXTERN_C #endif END_EXTERN_C -#ifdef HAVE_WINDOWS_H -#include -#endif - -#ifdef HAVE_GUSI_H -#include /* Use the Grand Unified Sockets Interface (GUSI) on Macintosh */ +/* platform independent definition of EINTR */ +enum +{ +#ifdef HAVE_WINSOCK_H + DCMNET_EINTR = WSAEINTR +#else + DCMNET_EINTR = EINTR #endif +}; OFGlobal dcmSocketSendTimeout(60); OFGlobal dcmSocketReceiveTimeout(60); -DcmTransportConnection::DcmTransportConnection(int openSocket) +DcmTransportConnection::DcmTransportConnection(DcmNativeSocketType openSocket) : theSocket(openSocket) { -#ifndef HAVE_GUSI_H if (theSocket >= 0) { #ifdef DISABLE_SEND_TIMEOUT @@ -121,7 +129,6 @@ DcmTransportConnection::DcmTransportConnection(int openSocket) } } } -#endif } DcmTransportConnection::~DcmTransportConnection() @@ -175,15 +182,21 @@ OFBool DcmTransportConnection::safeSelectReadableAssociation(DcmTransportConnect OFBool DcmTransportConnection::fastSelectReadableAssociation(DcmTransportConnection *connections[], int connCount, int timeout) { + +#ifdef _WIN32 + SOCKET socketfd = INVALID_SOCKET; + SOCKET maxsocketfd = INVALID_SOCKET; +#else int socketfd = -1; int maxsocketfd = -1; +#endif + int i=0; struct timeval t; fd_set fdset; - FD_ZERO(&fdset); - t.tv_sec = timeout; - t.tv_usec = 0; + OFTimer timer; + int lTimeout = timeout; for (i=0; i 0) done = OFTrue; // data available for reading + else + { + // check for interrupt call + if (OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR) + { + int diff = OFstatic_cast(int, timer.getDiff()); + if (diff < timeout) + { + lTimeout = timeout - diff; + continue; // retry + } + } + else + { + DCMNET_ERROR("socket select returned with error: " << OFStandard::getLastNetworkErrorCode().message()); + return OFFalse; + } + } } - if (nfound<=0) return OFFalse; /* none available for reading */ for (i=0; i -#include -#endif - /* * On DEC alpha the linker moans if a library is empty. * So define a dummy variable. @@ -152,11 +146,6 @@ int dcmtk_flock(int fd, int operation) return 0; } -void dcmtk_plockerr(const char *s) -{ - DCMNET_WARN(s << ": flock not implemented"); -} - #else /* macintosh */ #ifdef _WIN32 @@ -218,22 +207,6 @@ int dcmtk_flock(int fd, int operation) else return -1; /* unknown lock operation */ } -void dcmtk_plockerr(const char *s) -{ - LPVOID lpMsgBuf=NULL; - - FormatMessage( - FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - (LPTSTR) &lpMsgBuf, 0, NULL); - - if (lpMsgBuf && s) - DCMNET_ERROR(s << ": " << (const char*)lpMsgBuf); - LocalFree(lpMsgBuf); -} - #else /* USE__LOCKING */ /* Note: this alternative emulation of flock() for Win32 uses _locking(). @@ -266,12 +239,6 @@ int dcmtk_flock(int fd, int operation) return status; } -void dcmtk_plockerr(const char *s) -{ - char buf[256]; - DCMNET_ERROR(s << ": " << OFStandard::strerror(errno, buf, sizeof(buf))); -} - #endif /* USE__LOCKING */ #else /* _WIN32 */ @@ -325,12 +292,6 @@ int dcmtk_flock(int fd, int operation) return result; } -void dcmtk_plockerr(const char *s) -{ - char buf[256]; - DCMNET_ERROR(s << ": " << OFStandard::strerror(errno, buf, sizeof(buf))); -} - #endif /* _WIN32 */ #endif /* macintosh */ #endif /* HAVE_FLOCK */ @@ -379,36 +340,13 @@ int access(const char* path, int /* amode */) } #endif -#endif - -#if 0 // never called, replaced by OFStandard::strerror() -#ifndef HAVE_STRERROR +#endif /* HAVE_ACCESS */ -#warning Your system does not seem to have the strerror() function - -/* - * strerror does not appear to be available on SunOs 4.1.3 - */ -char *strerror(int errornum) +DCMTK_DCMNET_EXPORT void dcmtk_plockerr(const char *s) { - static char string[256]; - char *s = NULL; - /* - * These are not in the system include files, - * declare them here. - */ - extern int sys_nerr; - extern char *sys_errlist[]; - - string[0] = '\0'; - if (errornum < 0 || errornum >= sys_nerr) { - sprintf(string, "Error number: %d", errornum); - s = string; - } else { - s = sys_errlist[errornum]; - } - return s; -} - -#endif /* ! HAVE_STRERROR */ +#if !defined(HAVE_FLOCK) && defined(macintosh) + DCMNET_ERROR(s << ": flock not implemented"); +#else + DCMNET_ERROR(s << ": " << OFStandard::getLastSystemErrorCode().message()); #endif +} diff --git a/dcmnet/libsrc/dfindscu.cc b/dcmnet/libsrc/dfindscu.cc index 6343b15d..e6280eca 100644 --- a/dcmnet/libsrc/dfindscu.cc +++ b/dcmnet/libsrc/dfindscu.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2015, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -20,6 +20,7 @@ */ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + #include "dcmtk/dcmnet/dfindscu.h" #define INCLUDE_CSTDLIB @@ -28,7 +29,6 @@ #define INCLUDE_CSTDARG #define INCLUDE_CERRNO #include "dcmtk/ofstd/ofstdinc.h" - #include "dcmtk/dcmnet/diutil.h" #include "dcmtk/dcmdata/dcfilefo.h" #include "dcmtk/dcmdata/dcdicent.h" @@ -181,7 +181,6 @@ OFCondition DcmFindSCU::performQuery( { T_ASC_Association *assoc = NULL; T_ASC_Parameters *params = NULL; - DIC_NODENAME localHost; DIC_NODENAME peerHost; OFString temp_str; @@ -201,9 +200,8 @@ OFCondition DcmFindSCU::performQuery( /* Figure out the presentation addresses and copy the */ /* corresponding values into the association parameters.*/ - gethostname(localHost, sizeof(localHost) - 1); sprintf(peerHost, "%s:%d", peer, OFstatic_cast(int, port)); - ASC_setPresentationAddresses(params, localHost, peerHost); + ASC_setPresentationAddresses(params, OFStandard::getHostName().c_str(), peerHost); /* Set the presentation contexts which will be negotiated */ /* when the network connection will be established */ diff --git a/dcmnet/libsrc/dimse.cc b/dcmnet/libsrc/dimse.cc index 43bee367..22c38af3 100644 --- a/dcmnet/libsrc/dimse.cc +++ b/dcmnet/libsrc/dimse.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2016, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -84,7 +84,6 @@ #define INCLUDE_CSTDIO #define INCLUDE_CSTRING #define INCLUDE_CSTDARG -#define INCLUDE_CERRNO #define INCLUDE_UNISTD #include "dcmtk/ofstd/ofstdinc.h" @@ -919,9 +918,8 @@ DIMSE_sendMessage( { if (! dcmff.loadFile(dataFileName, EXS_Unknown).good()) { - char buf[256]; DCMNET_WARN(DIMSE_warn_str(assoc) << "sendMessage: cannot open DICOM file (" - << dataFileName << "): " << OFStandard::strerror(errno, buf, sizeof(buf))); + << dataFileName << "): " << OFStandard::getLastSystemErrorCode().message()); cond = DIMSE_SENDFAILED; } else { dataObject = dcmff.getDataset(); @@ -1397,6 +1395,11 @@ OFCondition DIMSE_createFilestream( metainfo->insert(elem, OFTrue); const char *version = OFFIS_DTK_IMPLEMENTATION_VERSION_NAME2; ((DcmShortString*)elem)->putString(version); + + if (strlen(OFFIS_DTK_IMPLEMENTATION_VERSION_NAME2) > 16) + { + DCMNET_WARN("DICOM implementation version name too long: " << OFFIS_DTK_IMPLEMENTATION_VERSION_NAME2); + } } else cond = EC_MemoryExhausted; if (NULL != (elem = new DcmApplicationEntity(sourceApplicationEntityTitle))) { diff --git a/dcmnet/libsrc/dimstore.cc b/dcmnet/libsrc/dimstore.cc index 1689993d..cd420436 100644 --- a/dcmnet/libsrc/dimstore.cc +++ b/dcmnet/libsrc/dimstore.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2010, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -206,7 +206,7 @@ DIMSE_storeUser( if (imageFileTotalBytes > 0) progress.totalBytes = imageFileTotalBytes; else { - if (imageFileName != NULL) progress.totalBytes = OFStandard::getFileSize(imageFileName); + if (imageFileName != NULL) progress.totalBytes = OFstatic_cast(long, OFStandard::getFileSize(imageFileName)); else progress.totalBytes = dcmGuessModalityBytes(request->AffectedSOPClassUID); } callbackCtx.progress = &progress; @@ -471,7 +471,7 @@ DIMSE_storeProvider( T_ASC_Association *assoc, delete filestream; if (cond != EC_Normal) { - if (strcmp(imageFileName, NULL_DEVICE_NAME) != 0) unlink(imageFileName); + if (strcmp(imageFileName, NULL_DEVICE_NAME) != 0) OFStandard::deleteFile(imageFileName); } } } diff --git a/dcmnet/libsrc/diutil.cc b/dcmnet/libsrc/diutil.cc index 905bc8c3..fbcb0265 100644 --- a/dcmnet/libsrc/diutil.cc +++ b/dcmnet/libsrc/diutil.cc @@ -123,7 +123,7 @@ DU_stripTrailingSpaces(char *s) if (s) { - n = strlen(s); + n = OFstatic_cast(int, strlen(s)); for (i = n - 1; i >= 0 && isspace(TO_UCHAR(s[i])); i--) s[i] = '\0'; } @@ -135,7 +135,7 @@ DU_stripLeadingSpaces(char *s) int i, j, n; if (s == NULL) return; - n = strlen(s); + n = OFstatic_cast(int, strlen(s)); if (n == 0) return; if (!isspace(TO_UCHAR(s[0]))) return; /* no leading space */ @@ -249,9 +249,9 @@ DU_findSOPClassAndInstanceInDataSet( /* gracefully correct space-padded UID strings */ int slength; - if ((0 < (slength=strlen(sopClass)))&&(sopClass[slength-1]==' ')) + if ((0 < (slength=OFstatic_cast(int, strlen(sopClass))))&&(sopClass[slength-1]==' ')) sopClass[slength-1]=0; - if ((0 < (slength=strlen(sopInstance)))&&(sopInstance[slength-1]==' ')) + if ((0 < (slength=OFstatic_cast(int, strlen(sopInstance))))&&(sopInstance[slength-1]==' ')) sopInstance[slength-1]=0; } return result; diff --git a/dcmnet/libsrc/dstorscp.cc b/dcmnet/libsrc/dstorscp.cc index dcf65042..26cf9a1c 100644 --- a/dcmnet/libsrc/dstorscp.cc +++ b/dcmnet/libsrc/dstorscp.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2013-2014, OFFIS e.V. + * Copyright (C) 2013-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -285,6 +285,9 @@ Uint16 DcmStorageSCP::checkAndProcessSTORERequest(const T_DIMSE_C_StoreRQ &reqMe } else { DCMNET_ERROR("cannot store received object: " << filename << ": " << status.text()); statusCode = STATUS_STORE_Refused_OutOfResources; + + // delete incomplete file + OFStandard::deleteFile(filename); } } else { DCMNET_ERROR("cannot create directory for received object: " << directoryName << ": " << status.text()); diff --git a/dcmnet/libsrc/dstorscu.cc b/dcmnet/libsrc/dstorscu.cc index a8863fb1..4cd7acf6 100644 --- a/dcmnet/libsrc/dstorscu.cc +++ b/dcmnet/libsrc/dstorscu.cc @@ -929,8 +929,6 @@ OFCondition DcmStorageSCU::sendSOPInstances() void DcmStorageSCU::notifySOPInstanceToBeSent(const TransferEntry & /*transferEntry*/) { - // avoid compiler warning - (void)transferEntry; // do nothing in the default implementation } diff --git a/dcmnet/libsrc/dul.cc b/dcmnet/libsrc/dul.cc index 9a9aedf7..757b9950 100644 --- a/dcmnet/libsrc/dul.cc +++ b/dcmnet/libsrc/dul.cc @@ -71,6 +71,11 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + +#ifdef HAVE_WINDOWS_H +#include /* for SO_EXCLUSIVEADDRUSE */ +#endif + #include "dcmtk/dcmnet/diutil.h" #define INCLUDE_CSTDLIB @@ -126,10 +131,6 @@ typedef void (*mySIG_TYP)(int); #endif END_EXTERN_C -#ifdef HAVE_GUSI_H -#include /* Use the Grand Unified Sockets Interface (GUSI) on Macintosh */ -#endif - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmnet/dcompat.h" #include "dcmtk/dcmnet/dicom.h" @@ -147,9 +148,8 @@ END_EXTERN_C #include "dcmtk/ofstd/ofnetdb.h" OFGlobal dcmDisableGethostbyaddr(OFFalse); -OFGlobal dcmStrictRoleSelection(OFFalse); OFGlobal dcmConnectionTimeout(-1); -OFGlobal dcmExternalSocketHandle(-1); +OFGlobal dcmExternalSocketHandle(DCMNET_INVALID_SOCKET); OFGlobal dcmTCPWrapperDaemonName((const char *)NULL); OFGlobal dcmEnableBackwardCompatibility(0); @@ -186,7 +186,13 @@ static OFCondition get_association_parameter(void *paramAddress, DUL_DATA_TYPE paramType, size_t paramLength, DUL_DATA_TYPE outputType, void *outputAddress, size_t outputLength); + +#ifdef _WIN32 +static void setTCPBufferLength(SOCKET sock); +#else static void setTCPBufferLength(int sock); +#endif + static OFCondition checkNetwork(PRIVATE_NETWORKKEY ** networkKey); static OFCondition checkAssociation(PRIVATE_ASSOCIATIONKEY ** association); static OFString dump_presentation_ctx(LST_HEAD ** l); @@ -215,6 +221,44 @@ void DUL_markProcessAsForkedChild() processIsForkedChild = OFTrue; } +OFCondition DUL_readSocketHandleAsForkedChild() +{ + OFCondition result = EC_Normal; + +#ifdef _WIN32 + // we are a child process + DUL_markProcessAsForkedChild(); + + char buf[256]; + DWORD bytesRead = 0; + HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE); + + // read socket handle number from stdin, i.e. the anonymous pipe + // to which our parent process has written the handle number. + if (ReadFile(hStdIn, buf, sizeof(buf) - 1, &bytesRead, NULL)) + { + // make sure buffer is zero terminated + buf[bytesRead] = '\0'; + unsigned __int64 socketHandle = 0; + sscanf(buf, "%llu", &socketHandle); + // socketHandle is always 64-bit because we always use this type to + // pass the handle between parent and chile. Type DcmNativeSocketType + // can be 32-bit on a 32-bit Windows, however. We, therefore, cast to the + // appropriate type. This is safe because the handle in the parent + // also had type DcmNativeSocketType. + dcmExternalSocketHandle.set(OFstatic_cast(DcmNativeSocketType, socketHandle)); + } + else + { + DCMNET_ERROR("cannot read socket handle: " << GetLastError()); + result = DUL_CANNOTREADSOCKETHANDLE; + } +#endif + + return result; +} + + void DUL_requestForkOnTransportConnectionReceipt(int argc, char *argv[]) { shouldFork = OFTrue; @@ -1002,6 +1046,7 @@ DUL_AbortAssociation(DUL_ASSOCIATIONKEY ** callerAssociation) DUL_ABORTITEMS abortItems = { 0, DUL_SCU_INITIATED_ABORT, 0 }; int event = 0; unsigned char pduType = 0; + OFCondition tcpError = makeDcmnetCondition(DULC_TCPIOERROR, OF_error, ""); PRIVATE_ASSOCIATIONKEY ** association = (PRIVATE_ASSOCIATIONKEY **) callerAssociation; OFCondition cond = checkAssociation(association); @@ -1056,7 +1101,9 @@ DUL_AbortAssociation(DUL_ASSOCIATIONKEY ** callerAssociation) else event = INVALID_PDU; cond = PRV_StateMachine(NULL, association, event, (*association)->protocolState, NULL); } - if (cond.good()) done = OFTrue; + // the comparison with tcpError prevents a potential infinite loop if + // we are receiving garbage over the network connection. + if (cond.good() || (cond == tcpError)) done = OFTrue; } return EC_Normal; } @@ -1499,8 +1546,13 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, int reuse = 1; +#ifdef _WIN32 + SOCKET sock = dcmExternalSocketHandle.get(); + if (sock != INVALID_SOCKET) +#else int sock = dcmExternalSocketHandle.get(); if (sock > 0) +#endif { // use the socket file descriptor provided to us externally // instead of calling accept(). @@ -1509,9 +1561,8 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, len = sizeof(from); if (getpeername(sock, &from, &len)) { - char buf[256]; OFOStringStream stream; - stream << "TCP Initialization Error: " << OFStandard::strerror(errno, buf, sizeof(buf)) + stream << "TCP Initialization Error: " << OFStandard::getLastNetworkErrorCode().message() << ", getpeername failed on socket " << sock << OFStringStream_ends; OFSTRINGSTREAM_GETOFSTRING(stream, msg) return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); @@ -1533,11 +1584,15 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, timeout_val.tv_sec = timeout; timeout_val.tv_usec = 0; #ifdef HAVE_INTP_SELECT - nfound = select((*network)->networkSpecific.TCP.listenSocket + 1, - (int *)(&fdset), NULL, NULL, &timeout_val); + nfound = select( + OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1), + (int *)(&fdset), NULL, NULL, &timeout_val); #else - nfound = select((*network)->networkSpecific.TCP.listenSocket + 1, - &fdset, NULL, NULL, &timeout_val); + // On Win32, it is safe to cast the first parameter to int + // because Windows ignores this parameter anyway. + nfound = select( + OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1), + &fdset, NULL, NULL, &timeout_val); #endif if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) { @@ -1564,10 +1619,14 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, timeout_val.tv_sec = 5; timeout_val.tv_usec = 0; #ifdef HAVE_INTP_SELECT - nfound = select((*network)->networkSpecific.TCP.listenSocket + 1, + nfound = select( + OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1), (int *)(&fdset), NULL, NULL, &timeout_val); #else - nfound = select((*network)->networkSpecific.TCP.listenSocket + 1, + // On Win32, it is safe to cast the first parameter to int + // because Windows ignores this parameter anyway. + nfound = select( + OFstatic_cast(int, (*network)->networkSpecific.TCP.listenSocket + 1), &fdset, NULL, NULL, &timeout_val); #endif if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) @@ -1586,13 +1645,16 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, do { sock = accept((*network)->networkSpecific.TCP.listenSocket, &from, &len); +#ifdef _WIN32 + } while (sock == INVALID_SOCKET && WSAGetLastError() == WSAEINTR); + if (sock == INVALID_SOCKET) +#else } while (sock == -1 && errno == EINTR); - if (sock < 0) +#endif { - char buf[256]; OFOStringStream stream; - stream << "TCP Initialization Error: " << OFStandard::strerror(errno, buf, sizeof(buf)) + stream << "TCP Initialization Error: " << OFStandard::getLastNetworkErrorCode().message() << ", accept failed on socket " << sock << OFStringStream_ends; OFSTRINGSTREAM_GETOFSTRING(stream, msg) return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); @@ -1619,9 +1681,8 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, // fork failed, return error code close(sock); - char buf[256]; OFString msg = "Multi-Process Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastSystemErrorCode().message(); msg += ", fork failed"; return makeDcmnetCondition(DULC_CANNOTFORK, OF_error, msg.c_str()); } @@ -1655,6 +1716,17 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, */ cmdLine += " \""; cmdLine += command_argv[i]; + /* if last character in argument value is a backslash, escape it + * since otherwise it would escape the quote appended in the following + * step, i.e. make sure that something like '\my\dir\' does not become + * '"\my\dir\"' but instead ends up as '"\my\dir\\"' (single quotes for + * demonstration purposes). Make sure nobody passes a zero length string. + */ + size_t len = strlen(command_argv[i]); + if ((len > 0) && (command_argv[i][len - 1] == '\\')) + { + cmdLine += "\\"; + } cmdLine += "\""; } @@ -1740,9 +1812,10 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, // send number of socket handle in child process over anonymous pipe DWORD bytesWritten; - char buf[20]; - sprintf(buf, "%i", OFstatic_cast(int, OFreinterpret_cast(size_t, childSocketHandle))); - if (!WriteFile(hChildStdInWriteDup, buf, strlen(buf) + 1, &bytesWritten, NULL)) + char buf[30]; + // we pass the socket handle as a 64-bit unsigned integer, which should work for 32 and 64 bit Windows + sprintf(buf, "%llu", OFreinterpret_cast(unsigned __int64, childSocketHandle)); + if (!WriteFile(hChildStdInWriteDup, buf, OFstatic_cast(DWORD, strlen(buf) + 1), &bytesWritten, NULL)) { CloseHandle(hChildStdInWriteDup); return makeDcmnetCondition(DULC_CANNOTFORK, OF_error, "Multi-Process Error: Writing to anonymous pipe failed"); @@ -1768,27 +1841,27 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, } #endif -#ifndef HAVE_GUSI_H - /* GUSI always returns an error for setsockopt() */ sockarg.l_onoff = 0; if (setsockopt(sock, SOL_SOCKET, SO_LINGER, (char *) &sockarg, sizeof(sockarg)) < 0) { - char buf[256]; OFOStringStream stream; - stream << "TCP Initialization Error: " << OFStandard::strerror(errno, buf, sizeof(buf)) + stream << "TCP Initialization Error: " << OFStandard::getLastNetworkErrorCode().message() << ", setsockopt failed on socket " << sock << OFStringStream_ends; OFSTRINGSTREAM_GETOFSTRING(stream, msg) return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } reuse = 1; + +#ifdef _WIN32 + if (setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *) &reuse, sizeof(reuse)) < 0) +#else if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &reuse, sizeof(reuse)) < 0) +#endif { - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } -#endif setTCPBufferLength(sock); /* @@ -1825,9 +1898,8 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, #endif if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char*)&tcpNoDelay, sizeof(tcpNoDelay)) < 0) { - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } #ifdef DISABLE_NAGLE_ALGORITHM @@ -1918,9 +1990,8 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network, #else (void) close(sock); #endif - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } @@ -2026,13 +2097,21 @@ initializeNetworkTCP(PRIVATE_NETWORKKEY ** key, void *parameter) (*key)->networkSpecific.TCP.tLayer = NULL; (*key)->networkSpecific.TCP.tLayerOwned = 0; (*key)->networkSpecific.TCP.port = -1; +#ifdef _WIN32 + (*key)->networkSpecific.TCP.listenSocket = INVALID_SOCKET; +#else (*key)->networkSpecific.TCP.listenSocket = -1; +#endif // Create listen socket if we're an application acceptor, // unless the socket handle has already been passed to us or // we are a forked child of an application acceptor, in which // case the socket also already exists. +#ifdef _WIN32 + if ((dcmExternalSocketHandle.get() == INVALID_SOCKET) && +#else if ((dcmExternalSocketHandle.get() < 0) && +#endif ((*key)->applicationFunction & DICOM_APPLICATION_ACCEPTOR) && (! processIsForkedChild)) { @@ -2044,70 +2123,72 @@ initializeNetworkTCP(PRIVATE_NETWORKKEY ** key, void *parameter) #else size_t length; #endif + +#ifdef _WIN32 + SOCKET sock; +#else int sock; +#endif struct sockaddr_in server; /* Create socket for Internet type communication */ (*key)->networkSpecific.TCP.port = *(int *) parameter; (*key)->networkSpecific.TCP.listenSocket = socket(AF_INET, SOCK_STREAM, 0); sock = (*key)->networkSpecific.TCP.listenSocket; + +#ifdef _WIN32 + if (sock == INVALID_SOCKET) +#else if (sock < 0) +#endif { - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } reuse = 1; -#ifdef HAVE_GUSI_H - /* GUSI always returns an error for setsockopt(...) */ +#ifdef _WIN32 + if (setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *) &reuse, sizeof(reuse)) < 0) #else if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &reuse, sizeof(reuse)) < 0) +#endif { - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } -#endif + /* Name socket using wildcards */ server.sin_family = AF_INET; server.sin_addr.s_addr = INADDR_ANY; server.sin_port = (unsigned short) htons((*key)->networkSpecific.TCP.port); if (bind(sock, (struct sockaddr *) & server, sizeof(server))) { - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } /* Find out assigned port number and print it out */ length = sizeof(server); if (getsockname(sock, (struct sockaddr *) &server, &length)) { - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } -#ifdef HAVE_GUSI_H - /* GUSI always returns an error for setsockopt(...) */ -#else sockarg.l_onoff = 0; if (setsockopt(sock, SOL_SOCKET, SO_LINGER, (char *) &sockarg, sizeof(sockarg)) < 0) { - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } -#endif + /* Listen on the socket */ if (listen(sock, PRV_LISTENBACKLOG) < 0) { - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } } @@ -2281,15 +2362,15 @@ get_association_parameter(void *paramAddress, ** Algorithm: ** Description of the algorithm (optional) and any other notes. */ -static void -setTCPBufferLength(int sock) +#ifdef _WIN32 +static void setTCPBufferLength(SOCKET sock) +#else +static void setTCPBufferLength(int sock) +#endif { char *TCPBufferLength; int bufLen; -#ifdef HAVE_GUSI_H - /* GUSI always returns an error for setsockopt(...) */ -#else /* * check whether environment variable TCP_BUFFER_LENGTH is set. * If not, the the operating system is responsible for selecting @@ -2312,7 +2393,6 @@ setTCPBufferLength(int sock) DCMNET_WARN("DUL: cannot parse environment variable TCP_BUFFER_LENGTH=" << TCPBufferLength); } else DCMNET_TRACE(" environment variable TCP_BUFFER_LENGTH not set, using the system defaults"); -#endif // HAVE_GUSI_H } @@ -2339,8 +2419,8 @@ DUL_DumpParams(OFString& ret_str, DUL_ASSOCIATESERVICEPARAMETERS * params) OFOStringStream str; OFString temp_str; - str << "APP CTX NAME:" << params->applicationContextName << OFendl; - str << dump_uid(params->applicationContextName, "%13s"); + str << "APP CTX NAME: " << params->applicationContextName << OFendl; + str << dump_uid(params->applicationContextName, "%14s") << OFendl; str << "AP TITLE: " << params->callingAPTitle << OFendl << "AP TITLE: " << params->calledAPTitle << OFendl << "AP TITLE: " << params->respondingAPTitle << OFendl @@ -2349,10 +2429,10 @@ DUL_DumpParams(OFString& ret_str, DUL_ASSOCIATESERVICEPARAMETERS * params) << "PRES ADDR: " << params->callingPresentationAddress << OFendl << "PRES ADDR: " << params->calledPresentationAddress << OFendl << "REQ IMP UID: " << params->callingImplementationClassUID << OFendl; - str << dump_uid(params->callingImplementationClassUID, "%13s"); + str << dump_uid(params->callingImplementationClassUID, "%14s") << OFendl; str << "REQ VERSION: " << params->callingImplementationVersionName << OFendl << "ACC IMP UID: " << params->calledImplementationClassUID << OFendl; - str << dump_uid(params->calledImplementationClassUID, "%13s"); + str << dump_uid(params->calledImplementationClassUID, "%14s") << OFendl; str << "ACC VERSION: " << params->calledImplementationVersionName << OFendl << "Requested Presentation Ctx" << OFendl; str << dump_presentation_ctx(¶ms->requestedPresentationContext); @@ -2427,17 +2507,17 @@ dump_presentation_ctx(LST_HEAD ** l) (void) LST_Position(l, (LST_NODE*)ctx); while (ctx != NULL) { - str << " Context ID: " << ctx->presentationContextID << OFendl - << " Abstract Syntax: " << ctx->abstractSyntax << OFendl; - str << dump_uid(ctx->abstractSyntax, "%24s"); - str << " Result field: " << (int) ctx->result << OFendl; + str << " Context ID: " << (int)ctx->presentationContextID << OFendl + << " Abstract Syntax: " << ctx->abstractSyntax << OFendl; + str << dump_uid(ctx->abstractSyntax, "%25s") << OFendl; + str << " Result field: " << (int) ctx->result << OFendl; for (l_index = 0; l_index < (int) DIM_OF(scMap); l_index++) { if (ctx->proposedSCRole == scMap[l_index].role) - str << " Proposed SCU/SCP Role: " << scMap[l_index].text << OFendl; + str << " Proposed SCU/SCP Role: " << scMap[l_index].text << OFendl; } for (l_index = 0; l_index < (int) DIM_OF(scMap); l_index++) { if (ctx->acceptedSCRole == scMap[l_index].role) - str << " Accepted SCU/SCP Role: " << scMap[l_index].text << OFendl; + str << " Accepted SCU/SCP Role: " << scMap[l_index].text << OFendl; } str << " Proposed Xfer Syntax(es)" << OFendl; if (ctx->proposedTransferSyntax != NULL) { @@ -2446,13 +2526,13 @@ dump_presentation_ctx(LST_HEAD ** l) (void) LST_Position(&ctx->proposedTransferSyntax, (LST_NODE*)transfer); while (transfer != NULL) { - str << " " << transfer->transferSyntax << OFendl; - str << dump_uid(transfer->transferSyntax, "%18s"); + str << " " << transfer->transferSyntax << OFendl; + str << dump_uid(transfer->transferSyntax, "%25s") << OFendl; transfer = (DUL_TRANSFERSYNTAX*)LST_Next(&ctx->proposedTransferSyntax); } } - str << " Accepted Xfer Syntax: " << ctx->acceptedTransferSyntax << OFendl; - str << dump_uid(ctx->acceptedTransferSyntax, "%24s"); + str << " Accepted Xfer Syntax: " << ctx->acceptedTransferSyntax << OFendl; + str << dump_uid(ctx->acceptedTransferSyntax, "%25s") << OFendl; ctx = (DUL_PRESENTATIONCONTEXT*)LST_Next(l); } diff --git a/dcmnet/libsrc/dulconst.cc b/dcmnet/libsrc/dulconst.cc index 810634a9..da7757db 100644 --- a/dcmnet/libsrc/dulconst.cc +++ b/dcmnet/libsrc/dulconst.cc @@ -1012,6 +1012,9 @@ constructSCUSCPRoles(unsigned char type, presentationCtx = (DUL_PRESENTATIONCONTEXT*)LST_Next(¶ms->requestedPresentationContext); } } else { // type != DUL_TYPEASSOCIATERQ + /* The implemented behaviour is documented in dul.h (see DUL_SC_ROLE enum definition). + * The error case is already handled in ASC_acceptPresentationContext() in assoc.cc. + */ presentationCtx = params->acceptedPresentationContext != NULL ? (DUL_PRESENTATIONCONTEXT*)LST_Head(¶ms->acceptedPresentationContext) : (DUL_PRESENTATIONCONTEXT*)NULL; diff --git a/dcmnet/libsrc/dulextra.cc b/dcmnet/libsrc/dulextra.cc index f7d143fd..4976308b 100644 --- a/dcmnet/libsrc/dulextra.cc +++ b/dcmnet/libsrc/dulextra.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2010, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -74,6 +74,11 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ +#ifdef HAVE_WINDOWS_H +// on Windows, we need Winsock2 for network functions +#include +#endif + #define INCLUDE_CSTDLIB #define INCLUDE_CSTDIO #define INCLUDE_CSTRING @@ -113,10 +118,9 @@ DcmTransportConnection *DUL_getTransportConnection(DUL_ASSOCIATIONKEY * callerAs else return ((PRIVATE_ASSOCIATIONKEY *)callerAssociation)->connection; } -int -DUL_networkSocket(DUL_NETWORKKEY * callerNet) +DcmNativeSocketType DUL_networkSocket(DUL_NETWORKKEY * callerNet) { - if (callerNet == NULL) return -1; + if (callerNet == NULL) return DCMNET_INVALID_SOCKET; PRIVATE_NETWORKKEY *net = (PRIVATE_NETWORKKEY*)callerNet; return net->networkSpecific.TCP.listenSocket; } @@ -125,8 +129,8 @@ OFBool DUL_associationWaiting(DUL_NETWORKKEY * callerNet, int timeout) { PRIVATE_NETWORKKEY *net; - int s; - OFBool assocWaiting = OFFalse; + DcmNativeSocketType s; + OFBool assocWaiting = OFFalse; struct timeval t; fd_set fdset; int nfound; @@ -139,19 +143,15 @@ DUL_associationWaiting(DUL_NETWORKKEY * callerNet, int timeout) s = net->networkSpecific.TCP.listenSocket; FD_ZERO(&fdset); -#ifdef __MINGW32__ - // on MinGW, FD_SET expects an unsigned first argument - FD_SET((unsigned int) s, &fdset); -#else FD_SET(s, &fdset); -#endif t.tv_sec = timeout; t.tv_usec = 0; #ifdef HAVE_INTP_SELECT - nfound = select(s + 1, (int *)(&fdset), NULL, NULL, &t); + nfound = select(OFstatic_cast(int, s + 1), (int *)(&fdset), NULL, NULL, &t); #else - nfound = select(s + 1, &fdset, NULL, NULL, &t); + // This is safe because on Windows the first select() parameter is ignored anyway + nfound = select(OFstatic_cast(int, s + 1), &fdset, NULL, NULL, &t); #endif if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) { diff --git a/dcmnet/libsrc/dulfsm.cc b/dcmnet/libsrc/dulfsm.cc index 1b6cf783..3cb5cf1b 100644 --- a/dcmnet/libsrc/dulfsm.cc +++ b/dcmnet/libsrc/dulfsm.cc @@ -64,6 +64,11 @@ #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ +#ifdef HAVE_WINDOWS_H +// on Windows, we need Winsock2 for network functions +#include +#endif + #define INCLUDE_CSTDLIB #define INCLUDE_CSTDIO #define INCLUDE_CSTRING @@ -98,10 +103,6 @@ BEGIN_EXTERN_C #endif END_EXTERN_C -#ifdef HAVE_GUSI_H -#include /* Use the Grand Unified Sockets Interface (GUSI) on Macintosh */ -#endif - #include "dcmtk/ofstd/ofstream.h" #include "dcmtk/dcmnet/dicom.h" #include "dcmtk/dcmnet/lst.h" @@ -123,6 +124,16 @@ END_EXTERN_C #define INADDR_NONE 0xffffffff #endif +/* platform independent definition of EINTR */ +enum +{ +#ifdef HAVE_WINSOCK_H + DCMNET_EINTR = WSAEINTR +#else + DCMNET_EINTR = EINTR +#endif +}; + static OFCondition AE_1_TransportConnect(PRIVATE_NETWORKKEY ** network, PRIVATE_ASSOCIATIONKEY ** association, int nextState, void *params); @@ -278,7 +289,12 @@ defragmentTCP(DcmTransportConnection *connection, DUL_BLOCKOPTIONS block, time_t static OFString dump_pdu(const char *type, void *buffer, unsigned long length); +#ifdef _WIN32 +static void setTCPBufferLength(SOCKET sock); +#else static void setTCPBufferLength(int sock); +#endif + OFCondition translatePresentationContextList(LST_HEAD ** internalList, LST_HEAD ** SCUSCPRoleList, @@ -351,6 +367,7 @@ static FSM_FUNCTION FSM_FunctionTable[] = { static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { { + // EVENT, STATE, ACTION, NEXT_STATE {A_ASSOCIATE_REQ_LOCAL_USER, STATE1, AE_1, STATE4, "", "", NULL}, {A_ASSOCIATE_REQ_LOCAL_USER, STATE2, NOACTION, NOSTATE, "", "", NULL}, {A_ASSOCIATE_REQ_LOCAL_USER, STATE3, NOACTION, NOSTATE, "", "", NULL}, @@ -363,7 +380,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {A_ASSOCIATE_REQ_LOCAL_USER, STATE10, NOACTION, NOSTATE, "", "", NULL}, {A_ASSOCIATE_REQ_LOCAL_USER, STATE11, NOACTION, NOSTATE, "", "", NULL}, {A_ASSOCIATE_REQ_LOCAL_USER, STATE12, NOACTION, NOSTATE, "", "", NULL}, - {A_ASSOCIATE_REQ_LOCAL_USER, STATE13, NOACTION, NOSTATE, "", "", NULL}}, + {A_ASSOCIATE_REQ_LOCAL_USER, STATE13, NOACTION, NOSTATE, "", "", NULL}}, { {TRANS_CONN_CONFIRM_LOCAL_USER, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -378,7 +395,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {TRANS_CONN_CONFIRM_LOCAL_USER, STATE10, NOACTION, NOSTATE, "", "", NULL}, {TRANS_CONN_CONFIRM_LOCAL_USER, STATE11, NOACTION, NOSTATE, "", "", NULL}, {TRANS_CONN_CONFIRM_LOCAL_USER, STATE12, NOACTION, NOSTATE, "", "", NULL}, - {TRANS_CONN_CONFIRM_LOCAL_USER, STATE13, NOACTION, NOSTATE, "", "", NULL}}, + {TRANS_CONN_CONFIRM_LOCAL_USER, STATE13, NOACTION, NOSTATE, "", "", NULL}}, { {A_ASSOCIATE_AC_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -393,7 +410,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {A_ASSOCIATE_AC_PDU_RCV, STATE10, AA_8, STATE13, "", "", NULL}, {A_ASSOCIATE_AC_PDU_RCV, STATE11, AA_8, STATE13, "", "", NULL}, {A_ASSOCIATE_AC_PDU_RCV, STATE12, AA_8, STATE13, "", "", NULL}, - {A_ASSOCIATE_AC_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}}, + {A_ASSOCIATE_AC_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}}, { {A_ASSOCIATE_RJ_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -408,7 +425,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {A_ASSOCIATE_RJ_PDU_RCV, STATE10, AA_8, STATE13, "", "", NULL}, {A_ASSOCIATE_RJ_PDU_RCV, STATE11, AA_8, STATE13, "", "", NULL}, {A_ASSOCIATE_RJ_PDU_RCV, STATE12, AA_8, STATE13, "", "", NULL}, - {A_ASSOCIATE_RJ_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}}, + {A_ASSOCIATE_RJ_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}}, { {TRANS_CONN_INDICATION, STATE1, AE_5, STATE2, "", "", NULL}, @@ -423,7 +440,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {TRANS_CONN_INDICATION, STATE10, NOACTION, NOSTATE, "", "", NULL}, {TRANS_CONN_INDICATION, STATE11, NOACTION, NOSTATE, "", "", NULL}, {TRANS_CONN_INDICATION, STATE12, NOACTION, NOSTATE, "", "", NULL}, - {TRANS_CONN_INDICATION, STATE13, NOACTION, NOSTATE, "", "", NULL}}, + {TRANS_CONN_INDICATION, STATE13, NOACTION, NOSTATE, "", "", NULL}}, { {A_ASSOCIATE_RQ_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -438,7 +455,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {A_ASSOCIATE_RQ_PDU_RCV, STATE10, AA_8, STATE13, "", "", NULL}, {A_ASSOCIATE_RQ_PDU_RCV, STATE11, AA_8, STATE13, "", "", NULL}, {A_ASSOCIATE_RQ_PDU_RCV, STATE12, AA_8, STATE13, "", "", NULL}, - {A_ASSOCIATE_RQ_PDU_RCV, STATE13, AA_7, STATE13, "", "", NULL}}, + {A_ASSOCIATE_RQ_PDU_RCV, STATE13, AA_7, STATE13, "", "", NULL}}, { {A_ASSOCIATE_RESPONSE_ACCEPT, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -453,7 +470,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {A_ASSOCIATE_RESPONSE_ACCEPT, STATE10, NOACTION, NOSTATE, "", "", NULL}, {A_ASSOCIATE_RESPONSE_ACCEPT, STATE11, NOACTION, NOSTATE, "", "", NULL}, {A_ASSOCIATE_RESPONSE_ACCEPT, STATE12, NOACTION, NOSTATE, "", "", NULL}, - {A_ASSOCIATE_RESPONSE_ACCEPT, STATE13, NOACTION, NOSTATE, "", "", NULL}}, + {A_ASSOCIATE_RESPONSE_ACCEPT, STATE13, NOACTION, NOSTATE, "", "", NULL}}, { {A_ASSOCIATE_RESPONSE_REJECT, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -468,7 +485,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {A_ASSOCIATE_RESPONSE_REJECT, STATE10, NOACTION, NOSTATE, "", "", NULL}, {A_ASSOCIATE_RESPONSE_REJECT, STATE11, NOACTION, NOSTATE, "", "", NULL}, {A_ASSOCIATE_RESPONSE_REJECT, STATE12, NOACTION, NOSTATE, "", "", NULL}, - {A_ASSOCIATE_RESPONSE_REJECT, STATE13, NOACTION, NOSTATE, "", "", NULL}}, + {A_ASSOCIATE_RESPONSE_REJECT, STATE13, NOACTION, NOSTATE, "", "", NULL}}, { {P_DATA_REQ, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -483,7 +500,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {P_DATA_REQ, STATE10, NOACTION, NOSTATE, "", "", NULL}, {P_DATA_REQ, STATE11, NOACTION, NOSTATE, "", "", NULL}, {P_DATA_REQ, STATE12, NOACTION, NOSTATE, "", "", NULL}, - {P_DATA_REQ, STATE13, NOACTION, NOSTATE, "", "", NULL}}, + {P_DATA_REQ, STATE13, NOACTION, NOSTATE, "", "", NULL}}, { {P_DATA_TF_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -498,7 +515,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {P_DATA_TF_PDU_RCV, STATE10, AA_8, STATE13, "", "", NULL}, {P_DATA_TF_PDU_RCV, STATE11, AA_8, STATE13, "", "", NULL}, {P_DATA_TF_PDU_RCV, STATE12, AA_8, STATE13, "", "", NULL}, - {P_DATA_TF_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}}, + {P_DATA_TF_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}}, { {A_RELEASE_REQ, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -513,7 +530,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {A_RELEASE_REQ, STATE10, NOACTION, NOSTATE, "", "", NULL}, {A_RELEASE_REQ, STATE11, NOACTION, NOSTATE, "", "", NULL}, {A_RELEASE_REQ, STATE12, NOACTION, NOSTATE, "", "", NULL}, - {A_RELEASE_REQ, STATE13, NOACTION, NOSTATE, "", "", NULL}}, + {A_RELEASE_REQ, STATE13, NOACTION, NOSTATE, "", "", NULL}}, { {A_RELEASE_RQ_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -528,7 +545,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {A_RELEASE_RQ_PDU_RCV, STATE10, AA_8, STATE13, "", "", NULL}, {A_RELEASE_RQ_PDU_RCV, STATE11, AA_8, STATE13, "", "", NULL}, {A_RELEASE_RQ_PDU_RCV, STATE12, AA_8, STATE13, "", "", NULL}, - {A_RELEASE_RQ_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}}, + {A_RELEASE_RQ_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}}, { {A_RELEASE_RP_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -543,7 +560,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {A_RELEASE_RP_PDU_RCV, STATE10, AR_10, STATE12, "", "", NULL}, {A_RELEASE_RP_PDU_RCV, STATE11, AR_3, STATE1, "", "", NULL}, {A_RELEASE_RP_PDU_RCV, STATE12, AA_8, STATE13, "", "", NULL}, - {A_RELEASE_RP_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}}, + {A_RELEASE_RP_PDU_RCV, STATE13, AA_6, STATE13, "", "", NULL}}, { {A_RELEASE_RESP, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -558,7 +575,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {A_RELEASE_RESP, STATE10, NOACTION, NOSTATE, "", "", NULL}, {A_RELEASE_RESP, STATE11, NOACTION, NOSTATE, "", "", NULL}, {A_RELEASE_RESP, STATE12, AR_4, STATE13, "", "", NULL}, - {A_RELEASE_RESP, STATE13, NOACTION, NOSTATE, "", "", NULL}}, + {A_RELEASE_RESP, STATE13, NOACTION, NOSTATE, "", "", NULL}}, { {A_ABORT_REQ, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -573,7 +590,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {A_ABORT_REQ, STATE10, AA_1, STATE13, "", "", NULL}, {A_ABORT_REQ, STATE11, AA_1, STATE13, "", "", NULL}, {A_ABORT_REQ, STATE12, AA_1, STATE13, "", "", NULL}, - {A_ABORT_REQ, STATE13, NOACTION, NOSTATE, "", "", NULL}}, + {A_ABORT_REQ, STATE13, NOACTION, NOSTATE, "", "", NULL}}, { {A_ABORT_PDU_RCV, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -588,7 +605,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {A_ABORT_PDU_RCV, STATE10, AA_3, STATE1, "", "", NULL}, {A_ABORT_PDU_RCV, STATE11, AA_3, STATE1, "", "", NULL}, {A_ABORT_PDU_RCV, STATE12, AA_3, STATE1, "", "", NULL}, - {A_ABORT_PDU_RCV, STATE13, AA_2, STATE1, "", "", NULL}}, + {A_ABORT_PDU_RCV, STATE13, AA_2, STATE1, "", "", NULL}}, { {TRANS_CONN_CLOSED, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -603,25 +620,36 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {TRANS_CONN_CLOSED, STATE10, AA_4, STATE1, "", "", NULL}, {TRANS_CONN_CLOSED, STATE11, AA_4, STATE1, "", "", NULL}, {TRANS_CONN_CLOSED, STATE12, AA_4, STATE1, "", "", NULL}, - {TRANS_CONN_CLOSED, STATE13, AR_5, STATE1, "", "", NULL}}, + {TRANS_CONN_CLOSED, STATE13, AR_5, STATE1, "", "", NULL}}, { {ARTIM_TIMER_EXPIRED, STATE1, NOACTION, NOSTATE, "", "", NULL}, {ARTIM_TIMER_EXPIRED, STATE2, AA_2T, STATE1, "", "", NULL}, {ARTIM_TIMER_EXPIRED, STATE3, NOACTION, NOSTATE, "", "", NULL}, {ARTIM_TIMER_EXPIRED, STATE4, NOACTION, NOSTATE, "", "", NULL}, - {ARTIM_TIMER_EXPIRED, STATE5, NOACTION, NOSTATE, "", "", NULL}, + + // DICOM part 8 does not define an action and state for the + // situation where a timeout occurs while we are waiting for an + // incoming A-ASSOCIATE-AC or A-ASSOCIATE-RJ. We close the transport + // connection, return an error code indicating a timout, + // and reset the FSM to idle state (STATE1). + {ARTIM_TIMER_EXPIRED, STATE5, AA_2T, STATE1, "", "", NULL}, + {ARTIM_TIMER_EXPIRED, STATE6, NOACTION, NOSTATE, "", "", NULL}, -/* This next line is not per the standard. We added a timeout action -** in this state. -*/ + + // DICOM part 8 does not define an action and state for the + // situation where a timeout occurs while we are waiting for an + // incoming A-RELEASE-RSP. We close the transport + // connection, return an error code indicating a timout, + // and reset the FSM to idle state (STATE1). {ARTIM_TIMER_EXPIRED, STATE7, AA_2T, STATE1, "", "", NULL}, + {ARTIM_TIMER_EXPIRED, STATE8, NOACTION, NOSTATE, "", "", NULL}, {ARTIM_TIMER_EXPIRED, STATE9, NOACTION, NOSTATE, "", "", NULL}, {ARTIM_TIMER_EXPIRED, STATE10, NOACTION, NOSTATE, "", "", NULL}, {ARTIM_TIMER_EXPIRED, STATE11, NOACTION, NOSTATE, "", "", NULL}, {ARTIM_TIMER_EXPIRED, STATE12, NOACTION, NOSTATE, "", "", NULL}, - {ARTIM_TIMER_EXPIRED, STATE13, AA_2, STATE1, "", "", NULL}}, + {ARTIM_TIMER_EXPIRED, STATE13, AA_2, STATE1, "", "", NULL}}, { {INVALID_PDU, STATE1, NOACTION, NOSTATE, "", "", NULL}, @@ -636,7 +664,7 @@ static FSM_ENTRY StateTable[DUL_NUMBER_OF_EVENTS][DUL_NUMBER_OF_STATES] = { {INVALID_PDU, STATE10, AA_8, STATE13, "", "", NULL}, {INVALID_PDU, STATE11, AA_8, STATE13, "", "", NULL}, {INVALID_PDU, STATE12, AA_8, STATE13, "", "", NULL}, - {INVALID_PDU, STATE13, AA_7, STATE13, "", "", NULL}} + {INVALID_PDU, STATE13, AA_7, STATE13, "", "", NULL}} }; @@ -994,10 +1022,10 @@ AE_3_AssociateConfirmationAccept(PRIVATE_NETWORKKEY ** /*network*/, (*association)->maxPDV = assoc.userInfo.maxLength.maxLength; (*association)->maxPDVAcceptor = assoc.userInfo.maxLength.maxLength; - strcpy(service->calledImplementationClassUID, - assoc.userInfo.implementationClassUID.data); - strcpy(service->calledImplementationVersionName, - assoc.userInfo.implementationVersionName.data); + OFStandard::strlcpy(service->calledImplementationClassUID, + assoc.userInfo.implementationClassUID.data, DICOM_UI_LENGTH + 1); + OFStandard::strlcpy(service->calledImplementationVersionName, + assoc.userInfo.implementationVersionName.data, 16 + 1); (*association)->associationState = DUL_ASSOC_ESTABLISHED; (*association)->protocolState = nextState; @@ -1199,10 +1227,10 @@ AE_6_ExamineAssociateRequest(PRIVATE_NETWORKKEY ** /*network*/, (*association)->maxPDV = assoc.userInfo.maxLength.maxLength; (*association)->maxPDVRequestor = assoc.userInfo.maxLength.maxLength; - strcpy(service->callingImplementationClassUID, - assoc.userInfo.implementationClassUID.data); - strcpy(service->callingImplementationVersionName, - assoc.userInfo.implementationVersionName.data); + OFStandard::strlcpy(service->callingImplementationClassUID, + assoc.userInfo.implementationClassUID.data, DICOM_UI_LENGTH + 1); + OFStandard::strlcpy(service->callingImplementationVersionName, + assoc.userInfo.implementationVersionName.data, 16 + 1); (*association)->associationState = DUL_ASSOC_ESTABLISHED; destroyPresentationContextList(&assoc.presentationContextList); @@ -2183,7 +2211,11 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, int port; struct sockaddr_in server; OFStandard::OFHostent hp; +#ifdef _WIN32 + SOCKET s; +#else int s; +#endif struct linger sockarg; if (sscanf(params->calledPresentationAddress, "%[^:]:%d", node, &port) != 2) @@ -2194,11 +2226,14 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, } s = socket(AF_INET, SOCK_STREAM, 0); +#ifdef _WIN32 + if (s == INVALID_SOCKET) +#else if (s < 0) +#endif { - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } server.sin_family = AF_INET; @@ -2250,7 +2285,7 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, int rc; do { rc = connect(s, (struct sockaddr *) & server, sizeof(server)); - } while (rc == -1 && errno == EINTR); + } while (rc == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); #ifdef HAVE_WINSOCK_H if (rc == SOCKET_ERROR && WSAGetLastError() == WSAEWOULDBLOCK) @@ -2273,8 +2308,9 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, timeout.tv_usec = 0; do { - rc = select(s + 1, NULL, &fdSet, NULL, &timeout); - } while (rc == -1 && errno == EINTR); + // the typecast is safe because Windows ignores the first select() parameter anyway + rc = select(OFstatic_cast(int, s + 1), NULL, &fdSet, NULL, &timeout); + } while (rc == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL)) { @@ -2301,9 +2337,8 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, if ((*association)->connection) delete (*association)->connection; (*association)->connection = NULL; - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); msg += " (Timeout)"; return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } @@ -2374,9 +2409,8 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, if ((*association)->connection) delete (*association)->connection; (*association)->connection = NULL; - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } else { // success - we've opened a TCP transport connection @@ -2400,25 +2434,19 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, #endif (*association)->networkState = NETWORK_DISCONNECTED; - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } sockarg.l_onoff = 0; sockarg.l_linger = 0; -#ifdef HAVE_GUSI_H - /* GUSI always returns an error for setsockopt(...) */ -#else if (setsockopt(s, SOL_SOCKET, SO_LINGER, (char *) &sockarg, (int) sizeof(sockarg)) < 0) { - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } -#endif setTCPBufferLength(s); /* @@ -2455,9 +2483,8 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network, #endif if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char*)&tcpNoDelay, sizeof(tcpNoDelay)) < 0) { - char buf[256]; OFString msg = "TCP Initialization Error: "; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str()); } #ifdef DISABLE_NAGLE_ALGORITHM @@ -2550,12 +2577,11 @@ sendAssociationRQTCP(PRIVATE_NETWORKKEY ** /*network*/, do { nbytes = (*association)->connection ? (*association)->connection->write((char*)b, size_t(associateRequest.length + 6)) : 0; - } while (nbytes == -1 && errno == EINTR); + } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); if ((unsigned long) nbytes != associateRequest.length + 6) { - char buf[256]; OFString msg = "TCP I/O Error ("; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); msg += ") occurred in routine: sendAssociationRQTCP"; return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str()); } @@ -2634,12 +2660,11 @@ sendAssociationACTCP(PRIVATE_NETWORKKEY ** /*network*/, do { nbytes = (*association)->connection ? (*association)->connection->write((char*)b, size_t(associateReply.length + 6)) : 0; - } while (nbytes == -1 && errno == EINTR); + } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); if ((unsigned long) nbytes != associateReply.length + 6) { - char buf[256]; OFString msg = "TCP I/O Error ("; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); msg += ") occurred in routine: sendAssociationACTCP"; return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str()); } @@ -2710,12 +2735,11 @@ sendAssociationRJTCP(PRIVATE_NETWORKKEY ** /*network*/, { do { nbytes = (*association)->connection ? (*association)->connection->write((char*)b, size_t(pdu.length + 6)) : 0; - } while (nbytes == -1 && errno == EINTR); + } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); if ((unsigned long) nbytes != pdu.length + 6) { - char buf[256]; OFString msg = "TCP I/O Error ("; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); msg += ") occurred in routine: sendAssociationRJTCP"; return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str()); } @@ -2771,12 +2795,11 @@ sendAbortTCP(DUL_ABORTITEMS * abortItems, if (cond.good()) { do { nbytes = (*association)->connection ? (*association)->connection->write((char*)b, size_t(pdu.length + 6)) : 0; - } while (nbytes == -1 && errno == EINTR); + } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); if ((unsigned long) nbytes != pdu.length + 6) { - char buf[256]; OFString msg = "TCP I/O Error ("; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); msg += ") occurred in routine: sendAbortTCP"; return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str()); } @@ -2832,12 +2855,11 @@ sendReleaseRQTCP(PRIVATE_ASSOCIATIONKEY ** association) if (cond.good()) { do { nbytes = (*association)->connection ? (*association)->connection->write((char*)b, size_t(pdu.length + 6)) : 0; - } while (nbytes == -1 && errno == EINTR); + } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); if ((unsigned long) nbytes != pdu.length + 6) { - char buf[256]; OFString msg = "TCP I/O Error ("; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); msg += ") occurred in routine: sendReleaseRQTCP"; return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str()); } @@ -2894,12 +2916,11 @@ sendReleaseRPTCP(PRIVATE_ASSOCIATIONKEY ** association) if (cond.good()) { do { nbytes = (*association)->connection ? (*association)->connection->write((char*)b, size_t(pdu.length + 6)) : 0; - } while (nbytes == -1 && errno == EINTR); + } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); if ((unsigned long) nbytes != pdu.length + 6) { - char buf[256]; OFString msg = "TCP I/O Error ("; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); msg += ") occurred in routine: sendReleaseRPTCP"; return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str()); } @@ -2969,8 +2990,9 @@ sendPDataTCP(PRIVATE_ASSOCIATIONKEY ** association, /* start a loop iterate over all PDVs in the given */ /* list and send every PDVs data over the network */ - while (cond.good() && count-- > 0) + while (cond.good() && count > 0) { + --count; /* determine length of PDV */ length = pdv->fragmentLength; /* determine data to be set */ @@ -3047,14 +3069,13 @@ writeDataPDU(PRIVATE_ASSOCIATIONKEY ** association, do { nbytes = (*association)->connection ? (*association)->connection->write((char*)head, size_t(length)) : 0; - } while (nbytes == -1 && errno == EINTR); + } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); /* if not all head information was sent, return an error */ if ((unsigned long) nbytes != length) { - char buf[256]; OFString msg = "TCP I/O Error ("; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); msg += ") occurred in routine: writeDataPDU"; return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str()); } @@ -3064,14 +3085,13 @@ writeDataPDU(PRIVATE_ASSOCIATIONKEY ** association, { nbytes = (*association)->connection ? (*association)->connection->write((char*)pdu->presentationDataValue.data, size_t(pdu->presentationDataValue.length - 2)) : 0; - } while (nbytes == -1 && errno == EINTR); + } while (nbytes == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); /* if not all head information was sent, return an error */ if ((unsigned long) nbytes != pdu->presentationDataValue.length - 2) { - char buf[256]; OFString msg = "TCP I/O Error ("; - msg += OFStandard::strerror(errno, buf, sizeof(buf)); + msg += OFStandard::getLastNetworkErrorCode().message(); msg += ") occurred in routine: writeDataPDU"; return makeDcmnetCondition(DULC_TCPIOERROR, OF_error, msg.c_str()); } @@ -3652,7 +3672,7 @@ defragmentTCP(DcmTransportConnection *connection, DUL_BLOCKOPTIONS block, time_t /* data has become available, now call read(). */ bytesRead = connection->read((char*)b, size_t(l)); - } while (bytesRead == -1 && errno == EINTR); + } while (bytesRead == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR); /* if we actually received data, move the buffer pointer to its own end, update the variable */ /* that determines the end of the first loop, and update the reference parameter return variable */ @@ -3737,15 +3757,16 @@ dump_pdu(const char *type, void *buffer, unsigned long length) ** Algorithm: ** Description of the algorithm (optional) and any other notes. */ -static void -setTCPBufferLength(int sock) + +#ifdef _WIN32 +static void setTCPBufferLength(SOCKET sock) +#else +static void setTCPBufferLength(int sock) +#endif { char *TCPBufferLength; int bufLen; -#ifdef HAVE_GUSI_H - /* GUSI always returns an error for setsockopt(...) */ -#else /* * check whether environment variable TCP_BUFFER_LENGTH is set. * If not, the the operating system is responsible for selecting @@ -3768,7 +3789,6 @@ setTCPBufferLength(int sock) DCMNET_WARN("DULFSM: cannot parse environment variable TCP_BUFFER_LENGTH=" << TCPBufferLength); } else DCMNET_TRACE(" environment variable TCP_BUFFER_LENGTH not set, using the system defaults"); -#endif // HAVE_GUSI_H } /* translatePresentationContextList diff --git a/dcmnet/libsrc/dulparse.cc b/dcmnet/libsrc/dulparse.cc index 1d344f51..8b6cb832 100644 --- a/dcmnet/libsrc/dulparse.cc +++ b/dcmnet/libsrc/dulparse.cc @@ -710,11 +710,13 @@ parseSCUSCPRole(PRV_SCUSCPROLE * role, unsigned char *buf, if (role->length - 4 < UIDLength) return makeLengthError("SCU-SCP role list UID", role->length, 0, UIDLength); - OFStandard::strlcpy(role->SOPClassUID, (char*)buf, sizeof(role->SOPClassUID)); - if (UIDLength > sizeof(role->SOPClassUID)) + if (UIDLength > DICOM_UI_LENGTH) { - DCMNET_WARN("Provided role SOP Class UID " << role->SOPClassUID << " is shorter than its announced length " << UIDLength << " (ignored)"); + DCMNET_WARN("Provided role SOP Class UID length " << UIDLength + << " is larger than maximum allowed UID length " << DICOM_UI_LENGTH << " (will use 64 bytes max)"); + UIDLength = DICOM_UI_LENGTH; } + OFStandard::strlcpy(role->SOPClassUID, (char*)buf, UIDLength+1 /* +1 for 0-byte */); buf += UIDLength; role->SCURole = *buf++; role->SCPRole = *buf++; @@ -724,7 +726,7 @@ parseSCUSCPRole(PRV_SCUSCPROLE * role, unsigned char *buf, DCMNET_TRACE("Subitem parse: Type " << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(2) << (unsigned int)role->type << STD_NAMESPACE dec << ", Length " << STD_NAMESPACE setw(4) << (int)role->length - << ", Content: " << role->SOPClassUID << " " << (int)role->SCURole << " " << (int)role->SCPRole); + << ", Content: SOP Class: " << role->SOPClassUID << " SCU: " << (int)role->SCURole << " SCP: " << (int)role->SCPRole); return EC_Normal; } diff --git a/dcmnet/libsrc/dulstruc.h b/dcmnet/libsrc/dulstruc.h index 81783590..22da6ece 100644 --- a/dcmnet/libsrc/dulstruc.h +++ b/dcmnet/libsrc/dulstruc.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 1994-2010, OFFIS e.V. + * Copyright (C) 1994-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were partly developed by @@ -100,9 +100,9 @@ typedef struct { union { struct { int port; - int listenSocket; - DcmTransportLayer *tLayer; - int tLayerOwned; + DcmNativeSocketType listenSocket; + DcmTransportLayer *tLayer; + int tLayerOwned; } TCP; } networkSpecific; } PRIVATE_NETWORKKEY; diff --git a/dcmnet/libsrc/dwrap.c b/dcmnet/libsrc/dwrap.c index 7f5dce7b..07e08386 100644 --- a/dcmnet/libsrc/dwrap.c +++ b/dcmnet/libsrc/dwrap.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2012, OFFIS e.V. + * Copyright (C) 2012-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -23,6 +23,10 @@ #ifdef WITH_TCPWRAPPER +#ifdef HAVE_NETINET_IN_H +#include +#endif + #include /* for hosts_ctl */ #include diff --git a/dcmnet/libsrc/scp.cc b/dcmnet/libsrc/scp.cc index 8796ed09..10b553e2 100644 --- a/dcmnet/libsrc/scp.cc +++ b/dcmnet/libsrc/scp.cc @@ -31,18 +31,7 @@ DcmSCP::DcmSCP() : m_assoc(NULL), m_cfg() { -#ifdef HAVE_GUSI_H - // needed for Macintosh. - GUSISetup( GUSIwithSIOUXSockets ); - GUSISetup( GUSIwithInternetSockets ); -#endif - -#ifdef HAVE_WINSOCK_H - WSAData winSockData; - // we need at least version 1.1. - WORD winSockVersionNeeded = MAKEWORD( 1, 1 ); - WSAStartup(winSockVersionNeeded, &winSockData); -#endif + OFStandard::initializeNetwork(); } // ---------------------------------------------------------------------------- @@ -55,9 +44,7 @@ DcmSCP::~DcmSCP() dropAndDestroyAssociation(); } -#ifdef HAVE_WINSOCK_H - WSACleanup(); -#endif + OFStandard::shutdownNetwork(); } // ---------------------------------------------------------------------------- @@ -760,7 +747,7 @@ OFCondition DcmSCP::receiveSTORERequest(T_DIMSE_C_StoreRQ &reqMessage, } -OFCondition DcmSCP::sendSTOREResponse(T_ASC_PresentationContextID presID, +OFCondition DcmSCP::sendSTOREResponse(const T_ASC_PresentationContextID presID, const T_DIMSE_C_StoreRQ &reqMessage, const Uint16 rspStatusCode) { @@ -1649,10 +1636,10 @@ void DcmSCP::setMaxReceivePDULength(const Uint32 maxRecPDU) OFCondition DcmSCP::addPresentationContext(const OFString &abstractSyntax, const OFList &xferSyntaxes, - const T_ASC_SC_ROLE role, + const T_ASC_SC_ROLE requestorRole, const OFString &profile) { - return m_cfg->addPresentationContext(abstractSyntax, xferSyntaxes, role, profile); + return m_cfg->addPresentationContext(abstractSyntax, xferSyntaxes, requestorRole, profile); } // ---------------------------------------------------------------------------- @@ -1748,6 +1735,13 @@ void DcmSCP::setProgressNotificationMode(const OFBool mode) // ---------------------------------------------------------------------------- +void DcmSCP::setAlwaysAcceptDefaultRole(const OFBool enabled) +{ + m_cfg->setAlwaysAcceptDefaultRole(enabled); +} + +// ---------------------------------------------------------------------------- + /* Get methods for SCP settings and current association information */ OFBool DcmSCP::getRefuseAssociation() const diff --git a/dcmnet/libsrc/scpcfg.cc b/dcmnet/libsrc/scpcfg.cc index 560f0aef..ba9810e4 100644 --- a/dcmnet/libsrc/scpcfg.cc +++ b/dcmnet/libsrc/scpcfg.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2012-2015, OFFIS e.V. + * Copyright (C) 2012-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -197,6 +197,13 @@ void DcmSCPConfig::setProgressNotificationMode(const OFBool mode) // ---------------------------------------------------------------------------- +void DcmSCPConfig::setAlwaysAcceptDefaultRole(const OFBool enabled) +{ + m_assocConfig.setAlwaysAcceptDefaultRole(enabled); +} + +// ---------------------------------------------------------------------------- + /* Get methods for SCP settings and current association information */ OFBool DcmSCPConfig::getRefuseAssociation() const @@ -372,12 +379,16 @@ OFCondition DcmSCPConfig::addPresentationContext(const OFString &abstractSyntax, // create role key and amend configuration (if required) OFString DCMSCP_RO_KEY; - if ( role != ASC_SC_ROLE_DEFAULT ) + DCMSCP_RO_KEY = profileName; + DCMSCP_RO_KEY += "_ROLEKEY"; + result = m_assocConfig.createEmptyRoleList(DCMSCP_RO_KEY.c_str()); + if (result.good() && (role != ASC_SC_ROLE_DEFAULT)) { - DCMSCP_RO_KEY = profileName; - DCMSCP_RO_KEY += "_ROLEKEY"; result = m_assocConfig.addRole(DCMSCP_RO_KEY.c_str(), abstractSyntax.c_str(), role); } + if (result.bad()) + return result; + // create new profile if required and add presentation context as just defined. // we always use the same presentation context list. @@ -390,7 +401,7 @@ OFCondition DcmSCPConfig::addPresentationContext(const OFString &abstractSyntax, { // finally add new presentation context to list and profile to configuration if ( result.good() ) result = m_assocConfig.addPresentationContext(DCMSCP_PC_KEY.c_str(), abstractSyntax.c_str(), DCMSCP_TS_KEY.c_str()); - if ( result.good() ) result = m_assocConfig.addProfile(profileName.c_str(), DCMSCP_PC_KEY.c_str(), DCMSCP_RO_KEY.empty() ? NULL : DCMSCP_RO_KEY.c_str()); + if ( result.good() ) result = m_assocConfig.addProfile(profileName.c_str(), DCMSCP_PC_KEY.c_str(), DCMSCP_RO_KEY.c_str()); } else { diff --git a/dcmnet/libsrc/scu.cc b/dcmnet/libsrc/scu.cc index 1e0ecd41..475486f5 100644 --- a/dcmnet/libsrc/scu.cc +++ b/dcmnet/libsrc/scu.cc @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2008-2015, OFFIS e.V. + * Copyright (C) 2008-2017, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by @@ -55,18 +55,7 @@ DcmSCU::DcmSCU() : m_datasetConversionMode(OFFalse), m_progressNotificationMode(OFTrue) { - -#ifdef HAVE_GUSI_H - GUSISetup(GUSIwithSIOUXSockets); - GUSISetup(GUSIwithInternetSockets); -#endif - -#ifdef HAVE_WINSOCK_H - WSAData winSockData; - /* we need at least version 1.1 */ - WORD winSockVersionNeeded = MAKEWORD( 1, 1 ); - WSAStartup(winSockVersionNeeded, &winSockData); -#endif + OFStandard::initializeNetwork(); } void DcmSCU::freeNetwork() @@ -107,9 +96,7 @@ DcmSCU::~DcmSCU() freeNetwork(); } -#ifdef HAVE_WINSOCK_H - WSACleanup(); -#endif + OFStandard::shutdownNetwork(); } @@ -146,9 +133,8 @@ OFCondition DcmSCU::initNetwork() /* Figure out the presentation addresses and copy the */ /* corresponding values into the association parameters.*/ - DIC_NODENAME localHost; DIC_NODENAME peerHost; - gethostname(localHost, sizeof(localHost) - 1); + const OFString localHost = OFStandard::getHostName(); /* Since the underlying dcmnet structures reserve only 64 bytes for peer as well as local host name, we check here for buffer overflow. */ @@ -157,13 +143,13 @@ OFCondition DcmSCU::initNetwork() DCMNET_ERROR("Maximum length of peer host name '" << m_peer << "' is longer than maximum of 57 characters"); return EC_IllegalCall; // TODO: need to find better error code } - if (strlen(localHost) + 1 > 63) + if (localHost.size() + 1 > 63) { DCMNET_ERROR("Maximum length of local host name '" << localHost << "' is longer than maximum of 62 characters"); return EC_IllegalCall; // TODO: need to find better error code } sprintf(peerHost, "%s:%d", m_peer.c_str(), OFstatic_cast(int, m_peerPort)); - ASC_setPresentationAddresses(m_params, localHost, peerHost); + ASC_setPresentationAddresses(m_params, localHost.c_str(), peerHost); /* Add presentation contexts */ @@ -361,7 +347,8 @@ void DcmSCU::clearPresentationContexts() // Returns usable presentation context ID for a given abstract syntax UID and // transfer syntax UID. 0 if none matches. T_ASC_PresentationContextID DcmSCU::findPresentationContextID(const OFString &abstractSyntax, - const OFString &transferSyntax) + const OFString &transferSyntax, + const T_ASC_SC_ROLE requestorRole) { if (!isConnected()) return 0; @@ -384,6 +371,7 @@ T_ASC_PresentationContextID DcmSCU::findPresentationContextID(const OFString &ab found &= (pc->result == ASC_P_ACCEPTANCE); if (!transferSyntax.empty()) // ignore transfer syntax if not specified found &= (strcmp(pc->acceptedTransferSyntax, transferSyntax.c_str()) == 0); + if (found) found &= pc->acceptedSCRole == ascRole2dulRole(requestorRole); if (!found) pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l); } if (found) @@ -1386,7 +1374,11 @@ OFCondition DcmSCU::handleSTORERequest(const T_ASC_PresentationContextID /* pres } else { + DCMNET_ERROR("cannot write DICOM file: " << filename); cStoreReturnStatus = STATUS_STORE_Refused_OutOfResources; + + // delete incomplete file + OFStandard::deleteFile(filename); } return result; diff --git a/dcmnet/tests/Makefile.dep b/dcmnet/tests/Makefile.dep index f2cec330..1c0b6146 100644 --- a/dcmnet/tests/Makefile.dep +++ b/dcmnet/tests/Makefile.dep @@ -18,6 +18,7 @@ tdump.o: tdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -31,7 +32,9 @@ tdump.o: tdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -60,7 +63,8 @@ tdump.o: tdump.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dcompat.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \ + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/assoc.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \ @@ -85,6 +89,7 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -98,7 +103,9 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -129,6 +136,7 @@ tpool.o: tpool.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -142,7 +150,9 @@ tpool.o: tpool.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -181,8 +191,6 @@ tpool.o: tpool.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -229,14 +237,13 @@ tpool.o: tpool.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dcompat.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \ - ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \ - ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \ - ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ - ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ - ../include/dcmtk/dcmnet/dccfprmp.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h \ - ../include/dcmtk/dcmnet/scu.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \ + ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \ + ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \ + ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \ + ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \ + ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/scu.h tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/oftest.h \ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \ @@ -257,6 +264,7 @@ tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../ofstd/include/dcmtk/ofstd/ofcond.h \ ../../ofstd/include/dcmtk/ofstd/oflimits.h \ ../../config/include/dcmtk/config/arith.h \ + ../../ofstd/include/dcmtk/ofstd/oferror.h \ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \ ../../oflog/include/dcmtk/oflog/oflog.h \ @@ -270,7 +278,9 @@ tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../oflog/include/dcmtk/oflog/tchar.h \ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \ ../../oflog/include/dcmtk/oflog/appender.h \ - ../../ofstd/include/dcmtk/ofstd/ofaptr.h \ + ../../ofstd/include/dcmtk/ofstd/ofmem.h \ + ../../ofstd/include/dcmtk/ofstd/ofutil.h \ + ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../oflog/include/dcmtk/oflog/layout.h \ ../../oflog/include/dcmtk/oflog/streams.h \ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \ @@ -308,8 +318,6 @@ tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \ ../../ofstd/include/dcmtk/ofstd/ofmap.h \ - ../../ofstd/include/dcmtk/ofstd/ofutil.h \ - ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \ @@ -356,11 +364,10 @@ tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \ ../include/dcmtk/dcmnet/dcompat.h \ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \ ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \ - ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dimse.h \ - ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \ - ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \ - ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \ - ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \ - ../include/dcmtk/dcmnet/dccfprmp.h \ - ../../ofstd/include/dcmtk/ofstd/ofmem.h ../include/dcmtk/dcmnet/diutil.h \ - ../include/dcmtk/dcmnet/scu.h + ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \ + ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/scpcfg.h \ + ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \ + ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \ + ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \ + ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \ + ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/scu.h diff --git a/dcmnet/tests/Makefile.in b/dcmnet/tests/Makefile.in index 0cf0e5c5..c12b3af4 100644 --- a/dcmnet/tests/Makefile.in +++ b/dcmnet/tests/Makefile.in @@ -21,7 +21,7 @@ LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include \ LIBDIRS = -L$(top_srcdir)/libsrc -L$(ofstddir)/libsrc -L$(oflogdir)/libsrc \ -L$(dcmdatadir)/libsrc -L$(dcmtlsdir)/libsrc $(compr_libdirs) LOCALLIBS = -ldcmnet -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(TCPWRAPPERLIBS) \ - $(CHARCONVLIBS) + $(CHARCONVLIBS) $(MATHLIBS) objs = tests.o tdump.o tpool.o tscuscp.o progs = tests diff --git a/dcmnet/tests/tests.cc b/dcmnet/tests/tests.cc index c22672ca..322a91d1 100644 --- a/dcmnet/tests/tests.cc +++ b/dcmnet/tests/tests.cc @@ -32,6 +32,7 @@ OFTEST_REGISTER(dcmnet_scp_stop_after_timeout); OFTEST_REGISTER(dcmnet_scp_no_stop_wo_request_noblock); OFTEST_REGISTER(dcmnet_scp_no_stop_wo_request_block); OFTEST_REGISTER(dcmnet_scp_no_term_notify_without_association); +OFTEST_REGISTER(dcmnet_scp_role_selection); #endif // WITH_THREADS OFTEST_MAIN("dcmnet") diff --git a/dcmnet/tests/tscuscp.cc b/dcmnet/tests/tscuscp.cc index b4787628..e6cd4b12 100644 --- a/dcmnet/tests/tscuscp.cc +++ b/dcmnet/tests/tscuscp.cc @@ -27,6 +27,9 @@ #include "dcmtk/dcmnet/scp.h" #include "dcmtk/dcmnet/scu.h" +static OFLogger t_scuscp_logger= OFLog::getLogger("dcmtk.test.tscuscp"); + + /** SCP derived from DcmSCP in order to test two types of virtual methods: *